Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Oct 2005
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Anchors within DIV tags

    Hi, i am using the div tag to create a small scrolling box within the pages on a site i am working on and i was wondering is there any way to use anchors within a div box on a MAC? when i simply use an anchor, it scrolls up or down to the <a name> just fine on a a Windows PC, but on a MAC it freaks out and scrolls the entire page around. <div style="overflow:auto;height:315px;width:468px;"> is the code for the div box i am using.

    perhaps i need to name the div box? and if i do , do i simply put a name=X or how do i do that? thanks in advance to whoever helps me
    Last edited by thetroubleis; 11-23-2005 at 04:05 PM.

  • #2
    New Coder
    Join Date
    Oct 2005
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts
    does anyone have any ideas ?

  • #3
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Add id="somename" name="somename" to the open div tag. Then your link to that div should be
    Code:
    <a href="#somename">Go to somename</a>

  • #4
    New Coder
    Join Date
    Oct 2005
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hi thanks for your help. that didnt work though. the problem is the content within the DIV scrolls, and the anchor links are within the DIV. on the IBM it simply takes you to the right place, but on MAC , it scrolls the entire page way down, instead of just within the DIV. what can i do about this?

  • #5
    New Coder
    Join Date
    Oct 2005
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts
    anyone have anyideas ? has anyone ever even heard of this bug before?


  •  

    Posting Permissions

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