<a> and image useMap?

liunx

Guest
Hey all!!!<br />
<br />
I don't understand it... I thought, a few weeks ago, this code below worked perfectly! But now... :confused: <br />
<br />
<html><br />
<body><br />
<br />
<MAP id=1><br />
<area id="asdf" title="area" shape="rect" coords="0,0,50,50" href=http://www.webdeveloper.com/forum/archive/index.php/"http://www.test2.nl"><br />
</MAP><br />
<br />
<A href=http://www.webdeveloper.com/forum/archive/index.php/"http://www.test.nl"><br />
<IMG width=350px height=228px src=http://www.webdeveloper.com/forum/archive/index.php/"hotel.jpg" title="afbeelding" border=0 usemap="#1"><br />
</A><br />
<br />
</body><br />
</html><br />
<br />
It's the most simple code?! Isn't it possible to place an anchor (<a>) around an image when that image uses a map? I thought it was possible!!!!<br />
<br />
Thanks for you help!<!--content-->Use shape="default":<br />
<map id="1"><br />
<area id="asdf" title="area" shape="rect" coords="0,0,50,50" href=http://www.webdeveloper.com/forum/archive/index.php/"http://www.test2.nl"><br />
<area shape="default" coords="0,0,350,228" href=http://www.webdeveloper.com/forum/archive/index.php/"http://www.test.nl" alt="" /><br />
</map><br />
<img width="350px" height="228px" src=http://www.webdeveloper.com/forum/archive/index.php/"hotel.jpg" title="afbeelding" border="0" usemap="#1"><!--content-->Originally posted by Fang <br />
Use shape="default" <br />
Yes, I allready knew that way, but it DOESN'T work (or I do something wrong?)<br />
<br />
When you look at the Micro$oft MSDN Library, 'default' isn't an option anymore... I thought it also worked with <a> but maybe does <a> and default only work with 'older' browsers?<br />
<br />
Thanks anyway Fang, good luck tomorrow (Nederland-Tsjechie) :p<!--content-->Must have a name in map:<br />
<map id="nl1" name="nl1"><br />
<br />
BTY first character of id can not be numeric.<!--content-->Originally posted by Fang <br />
Must have a name in map:<br />
<map id="nl1" name="nl1"><br />
<br />
BTY first character of id can not be numeric. <br />
<br />
Had no problems without both of them... The map works fine, the <a> around the image doesn't work...<!--content-->It works in Mozilla, but not in IE.<br />
This is because of the way event bubbling differ in these browsers.<br />
If using default works why wrap an anchor around the image?<br />
<br />
id's and name's should not begin with a numeric value (<!-- m --><a class="postlink" href="http://www.w3.org/TR/html4/types.html#h-6.2">http://www.w3.org/TR/html4/types.html#h-6.2</a><!-- m -->).<!--content-->
 
Back
Top