PDA

View Full Version : why won't my image maps work in safari?




MacTurtle
Dec 5, 2005, 08:26 PM
So, I'm building my image maps by hand...

The resulting code works fine in IE6, but won't work in Safari. I'm confused. The image displays. I've looked at several articles on the net trying to solve my problem and I'm just not turning anything up...

Any suggestions? I've pasted the relevant code below...

------------

<map id = "picture">
<area href = "home.html" shape = "rect"
coords = "0,0,50,20"
alt = "go to the home page" TARGET="rightframe"/>

<area href = "hobbies.html" shape = "rect"
coords = "0,50, 60,75"
alt = "go to the hobbies page" TARGET="rightframe"/>

<area href = "feedback.html" shape = "rect"
coords = "125,60,190,75"
alt = "go to leave feedback" TARGET="rightframe"/>

<area href = "links.html" shape = "rect"
coords = "255,0,299,20"
alt = "go to the links page" TARGET="rightframe"/>

<area href = "mailto:mveenstra@uta.edu" shape = "rect"
coords = "255,60,299,75"
alt = "send me email" TARGET="rightframe"/>
</map>

<p align="center"><img src="../images/tdbtop.gif" height = "75" width = "300" alt="My Logo"
usemap = "#picture" border = 0 /></p>



Blackheart
Dec 5, 2005, 08:35 PM
The resulting code works fine in IE6

I believe you answered your own question. ;)

MacTurtle
Dec 5, 2005, 08:38 PM
I believe you answered your own question. ;)

<chuckle> :D

no, really!! I know they don't work in firefox either. It's really strange. It's got to be something simple I'm missing...

Blackheart
Dec 5, 2005, 08:39 PM
<chuckle> :D

no, really!! I know they don't work in firefox either. It's really strange. It's got to be something simple I'm missing...

Yeah, I'm looking up some stuff right now. I'll post back if I find anything captivating.

EDIT: By any chance, do you have your code on a site, so at least I can see the differences with images intact and such?

MacTurtle
Dec 5, 2005, 08:44 PM
http://students.uta.edu/ma/mav5270

The top image map in the top frame is what I'm concerned with. It works in ie6 on xp.

Grover
Dec 5, 2005, 08:49 PM
Try defining a name attribute that's the same as the id:

<map id = "picture" name = "picture">

MacTurtle
Dec 5, 2005, 08:55 PM
Try defining a name attribute that's the same as the id:

<map id = "picture" name = "picture">

:D That's it! that made it work!

Now why couldn't I find that hours ago!! It must be something that is required for strict html, ie is sloppy and just assumes. Safari is pickier.

Thanks a lot for the help.