why won't my image maps work in safari?

Discussion in 'Mac Programming' started by MacTurtle, Dec 5, 2005.

  1. MacTurtle macrumors member

    Joined:
    Jul 30, 2005
    Location:
    Arlington, TX
    #1
    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>
     
  2. Blackheart macrumors 6502a

    Blackheart

    Joined:
    Mar 13, 2004
    Location:
    Seattle
    #2
    I believe you answered your own question. ;)
     
  3. MacTurtle thread starter macrumors member

    Joined:
    Jul 30, 2005
    Location:
    Arlington, TX
    #3
    <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...
     
  4. Blackheart macrumors 6502a

    Blackheart

    Joined:
    Mar 13, 2004
    Location:
    Seattle
    #4
    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?
     
  5. MacTurtle thread starter macrumors member

    Joined:
    Jul 30, 2005
    Location:
    Arlington, TX
    #5
  6. Grover macrumors member

    Joined:
    May 14, 2004
    #6
    Try defining a name attribute that's the same as the id:

    <map id = "picture" name = "picture">
     
  7. MacTurtle thread starter macrumors member

    Joined:
    Jul 30, 2005
    Location:
    Arlington, TX
    #7
    :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.
     

Share This Page