#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2004
    Posts
    16
    Rep Power
    0

    Anchor tags in Safari


    I'm building a site which requires some navigation that jumps to various anchor tags. This is all O.K but they won't work when viewed in Safari. There fine in every other browser but not Safari. Has anyone got any ideas. Are there any issues that I don't know about?

    Thanks in advance.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2004
    Posts
    222
    Rep Power
    15
    Originally Posted by JustJon
    I'm building a site which requires some navigation that jumps to various anchor tags. This is all O.K but they won't work when viewed in Safari. There fine in every other browser but not Safari. Has anyone got any ideas. Are there any issues that I don't know about?

    Thanks in advance.
    This is probably not a Safari problem as I have a stats program the has anchor tags all over the place and work fine in Safari.

    Can you post some code or a page link?
    I'll be happy to check it out.

    -Bill
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2004
    Posts
    16
    Rep Power
    0
    Thanks for your help simplified code is below which will also not work in IE (Mac). I think I'm doing something very obvious wrong but can't figure out what it is:

    <a href="#test">Test</a><br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    ksjeghfkjsahkj<br/>
    <a name="test"></a>
  6. #4
  7. |<.+#f@#+.&.|
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2002
    Location
    norway
    Posts
    2,999
    Rep Power
    1228
    You can use id rather than name.
    Then you can easily jump to difrent section of the page.


    <a href="#Test">Test</a>


    <h1 id="test">Test</h1>

    http://www.w3.org/TR/html4/struct/li...nchors-with-id
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2004
    Posts
    222
    Rep Power
    15
    I can not figure out why the code you posted does not work.

    I have attached a file that works for me.
    Check it out and see if it works for you.

    You may have to change the .txt extension to .html although it worked fine for me.

    -Bill
    Attached Files
  10. #6
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2004
    Posts
    16
    Rep Power
    0
    Thanks for all the help guys.

    It turns out the problem was how I was calling the page. It was the index in a particular directory so I was calling like: www.domain.com/directoryname#anchorname which worked for every browser except safari.

    Its weird because the simplified code I posted doesnt work either but for another reason. I think its because the anchor is the last thing on the page. The same applies for the code you posted it works fine as you posted it but as soon as you remove everything below the bottom anchor it stops working. Its as if it cant see the tag. Thanks again.

IMN logo majestic logo threadwatch logo seochat tools logo