Forum Moderators: phranque

Message Too Old, No Replies

Image map link problem in IE

A HREF link on image does not work in IE when image map is used.

         

RickDyer

8:44 am on Sep 5, 2008 (gmt 0)

10+ Year Member



Does anybody know why the A HREF link applied to an image fails to work in IE if other HREF links are applied to the image using image maps? And are there any solutions to this problem.

For example:

<a href="click1.htm"><img src="theimage.gif" alt="This click works only in Firefox" width="120" height="300" border="0" usemap="#Map" /></a>
<map name="Map" id="Map">
<area shape="rect" coords="18,118,102,205" href="#" target="click2.htm" alt="This click works in Firefox AND IE" />
</map>

[edited by: RickDyer at 8:45 am (utc) on Sep. 5, 2008]

rocknbil

4:19 pm on Sep 5, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Because the anchor element is overriding the map. I don't know why, all I know is you can't do this. :-)

Try

<img src="theimage.gif" alt="This click works only in Firefox" width="120" height="300" border="0" usemap="#Map">
<map name="Map" id="Map">
<area shape="rect" coords="18,118,102,205" href="click2.htm" alt="targeted link">
<area shape="rect" href="/" coords="0,0,120,300" alt="home">
</map>

You could also use the default which does the same thing:

<area shape="default" href="/" alt="return to main page">