SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Member
    Join Date
    Apr 2009
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Safari not recognising <map>

    IE7, IE8 and Firefox all recognise my <map> but Safari doesn't.

    Here's the markup

    <img src="corner.jpg" width="96" height="97"
    alt="site map" usemap="#sitemap" border="0" />
    <map id="sitemap">
    <area shape="poly" coords="36,36,80,25,25,80"
    href="Garden-shed-story-4.html" alt="Next page" />
    </map>


    I've read a discussion about how Safari seems to take longer to load it but I'm not getting anywhere with that.

    Any ideas please?

  2. #2
    Guru in training bronze trophy SoulScratch's Avatar
    Join Date
    Apr 2006
    Location
    Maryland
    Posts
    1,838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is this a geometric shape or is it a square clickable region? You could alternatively use css and overlay an anchor on top of another element to click that.
    Cross browser css bugs

    Dan Schulz you will be missed

  3. #3
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,788
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    With that number of coordinates it would be a triangle.

    According to the SitePoint Ultimate HTML Reference book that way of defining it is supported by Safari 1.3+ and so if it isn't working then there must be something else in the page that is interfering with it.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  4. #4
    SitePoint Member
    Join Date
    Apr 2009
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Felgall - thanks, it is a bit of a mystery.

    Can you suggest what else in the page might be interfering with it? The page passes the W3C html checker.

  5. #5
    doing my best to help c2uk's Avatar
    Join Date
    May 2005
    Location
    Cardiff
    Posts
    1,832
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    can you not get us to a live version, makes it so much easier.

  6. #6
    SitePoint Member
    Join Date
    Apr 2009
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Site is wwwdotdaftbunnydotcodotuk. It's the story pages where the problem is. I realise now that the map doesn't work in Firefox either.

  7. #7
    doing my best to help c2uk's Avatar
    Join Date
    May 2005
    Location
    Cardiff
    Posts
    1,832
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by felgall View Post
    With that number of coordinates it would be a triangle.

    According to the SitePoint Ultimate HTML Reference book that way of defining it is supported by Safari 1.3+ and so if it isn't working then there must be something else in the page that is interfering with it.
    felgall, you disappoint me - looking at the Ultimate HTML Reference it's clear that the error is that the map tag uses the ID attribute instead of the name attribute listed there: http://reference.sitepoint.com/html/map

    So OP, it should be

    <map name="sitemap">

    but you can keep the id the same if you want it.

    Having said that, you don't need a map for that, keep the whole image as a link is absolutely fine, and you might want to give it a title, so that when hovering, people actually know what the link is for.

  8. #8
    SitePoint Member
    Join Date
    Apr 2009
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    c2uk

    Thanks - I changed it to name and that works fine....I think I spoofed this from Dave Raggett and I'll have a go at making it simpler as you suggest.

    Thanks everyone - problem solved!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •