PDA

View Full Version : image mapping alt tags don't show in firefox?



Peegee
04-22-2004, 01:29 AM
<xmp>
<map name="Map">
<area shape="rect" coords="0,200,400,0" href="#" alt="Eyes omg!">
</map>
<img usemap="#Map" width="400" height="200" border="0" src="http://forums.eyesonff.com/images/LeezaA.jpg" />
</xmp>


eg:
<map name="Map">
<area shape="rect" coords="0,200,400,0" href="#" alt="Eyes omg!">
</map>
<img usemap="#Map" width="400" height="200" border="0" src="http://forums.eyesonff.com/images/LeezaA.jpg" />

I'm working with different types of thinking. Some fora say that the coordinates must be x-left, y-top, x-right, y-bottom, and I personally think the coordinates are like the top right section of a cartesian two-dimensional plane (0, 0) being at the bottom left corner, for example.

So according to the x-left y-top / x-right y-bottom thinking, the coordinates 0, 200, 400, 0 should work. It doesn't. I just get a link, and no alt text (in firefox). Why?

Dr Unne
04-22-2004, 02:28 AM
How about this.


&lt;map name="useTITLEnotALT">
&lt;area shape="rect" coords="0,200,400,0" href="#" title="Eyes omg!">
&lt;/map>
&lt;img usemap="#useTITLEnotALT" width="400" height="200" border="0" src="http://forums.eyesonff.com/images/LeezaA.jpg" />

<map name="useTITLEnotALT">
<area shape="rect" coords="0,200,400,0" href="#" title="Eyes omg!">
</map>
<img usemap="#useTITLEnotALT" width="400" height="200" border="0" src="http://forums.eyesonff.com/images/LeezaA.jpg" />

Peegee
04-22-2004, 03:10 AM
Marvellous, Dr Unne! You have contributed to the EoFF FF8 map which will be made sometime in May because I have exams!

crono_logical
04-22-2004, 03:33 AM
Yes, use title. IE goes against HTML specifications and incorrectly uses the alt tag for a tooltip when the image loads - the alt is only for when you can't see the image. :p Mozilla/Firefox behaves correctly and ignores alt when it can display the image :p

Peegee
04-22-2004, 06:17 AM
I can't believe I didn't know that. I've taken html courses too! Blasted IE monopoly over the internet world!

crono_logical
04-22-2004, 09:03 AM
That's because Microsoft doesn't like letting you know it breaks rules :p