Questo sito potrebbe offrire funzionalità limitate durante le operazioni di manutenzione per migliorare l'esperienza utente. Se un articolo non risolve il tuo problema e vuoi richiedere supporto, la nostra comunità di supporto è pronta ad aiutarti tramite @FirefoxSupport su Twitter e /r/firefox su Reddit.

Cerca nel supporto

Attenzione alle mail truffa. Mozilla non chiederà mai di chiamare o mandare messaggi a un numero di telefono o di inviare dati personali. Segnalare qualsiasi attività sospetta utilizzando l'opzione “Segnala abuso”.

Ulteriori informazioni

Questa discussione è archiviata. Inserire una nuova richiesta se occorre aiuto.

Image in an <a> element doesn't link in a <div> element set

  • 2 risposte
  • 1 ha questo problema
  • 5 visualizzazioni
  • Ultima risposta di cor-el

more options

The following code works in other browsers but not FF, and it stopped working in FF probably around version 14 or so (when I first noticed). \ = angle bracket

<div style="float:left;width:350px;">
<a href="index.html"><img src="red.jpg" alt="red" width="349" height="100" align="left" border="0"></a>
</div>

<div style="position:relative;top:20px;">
<h2 align="center">Text Moved to Right<br>
to test anchor link</h2>
</div>

If you mouse over the red box image area, the anchor only works at the top and bottom margin of the image. If you remove the second <div>, the anchor element works ok. This works with other browsers I've tried, just not with FF.

I tried setting display:block for the <img> element to no avail. Maybe something changed in the browser's main rendering engine that's now causing this.

Thanks.

The following code works in other browsers but not FF, and it stopped working in FF probably around version 14 or so (when I first noticed). \ = angle bracket <pre><nowiki><div style="float:left;width:350px;"> <a href="index.html"><img src="red.jpg" alt="red" width="349" height="100" align="left" border="0"></a> </div> <div style="position:relative;top:20px;"> <h2 align="center">Text Moved to Right<br> to test anchor link</h2> </div></nowiki></pre> If you mouse over the red box image area, the anchor only works at the top and bottom margin of the image. If you remove the second <nowiki><div></nowiki>, the anchor element works ok. This works with other browsers I've tried, just not with FF. I tried setting display:block for the <nowiki><img></nowiki> element to no avail. Maybe something changed in the browser's main rendering engine that's now causing this. Thanks.

Modificato da cor-el il

Tutte le risposte (2)

more options

Fixed the code in the previous post.

Modificato da rybrns il

more options

You may need a clear div because you have floating content.

A good place to ask advice about web development is at the MozillaZine "Web Development/Standards Evangelism" forum.

The helpers at that forum are more knowledgeable about web development issues.
You need to register at the MozillaZine forum site in order to post at that forum.