webForumDet fria alternativet

Alt-text i FF

4 svar · 566 visningar · startad av JakobJ

JakobJMedlem sedan apr. 200839 inlägg
#1

Ja, jag har upptäckt att FF inte gör som IE när det gäller alt-texter. T.ex:
<img src="URL" alt="TEXT">
Ja, i detta fall visar IE bilden och med musen ovanpå visar den även texten, detta gör inte FF, varför? Och går det att fixa?

Tack på förhand,

JakobJ

Web-TorMedlem sedan nov. 200013 890 inlägg
#2
<img src="URL" title="TEXT">
QuidMedlem sedan juni 20006 025 inlägg
#3

Most browsers do not display the content of the alt attribute unless the image is actually missing. It is, after all, supposed to be an alternative. Internet Explorer, however, will display the value for the alt in the form of a tooltip when you hover the mouse pointer over the img element in question. This is not the correct behaviour, so be mindful of the fact that it is the other browsers that are doing things according to spec, and it is Internet Explorer that is getting things slightly wrong. If you do want a tooltip effect on an image, the correct attribute to use for this is the title attribute.

http://reference.sitepoint.com/html/img/alt

JakobJMedlem sedan apr. 200839 inlägg
#4

Tack så mycket ;)!

itpastornMedlem sedan feb. 2007278 inlägg
#5

OBS! Man kan inte ersätta alt-attributet med title. De har skilda syften. Att MSIE behandlar alt på FEL sätt är tråkigt, men inget skäl att ersätta det med title.

128 ms totalt · 3 externa anrop · v20260731065814-full.3ab8d573
0 ms — hämta forumlista (cache)
0 ms — hämta statistik (cache)
126 ms — hämta tråd, inlägg och bilagor (db)