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 3 of 3
  1. #1
    New Coder
    Join Date
    Apr 2005
    Posts
    55
    Thanks
    0
    Thanked 0 Times in 0 Posts

    link to a certain point in a page

    Hi, how do you write a link to point to a specific point in another page, ie half way down a page, i've seen it down numerous times, but I can't find any tutorials out there to explain how its done, any ideas?
    cheers
    steve

  • #2
    New Coder mentalhorse's Avatar
    Join Date
    Jul 2005
    Location
    Duanesburg, NY
    Posts
    89
    Thanks
    0
    Thanked 0 Times in 0 Posts
    at the text you want the link to go to add a:
    <a id="nameyouwant">
    then at the link do one of these:
    <a href="#nameyouwant">
    and there you have it

  • #3
    Regular Coder
    Join Date
    Mar 2005
    Posts
    123
    Thanks
    0
    Thanked 0 Times in 0 Posts
    you could use css id selector to "group" the content you would like the link to be pointed to, then you could use that id value on your url, example below

    index.html
    Code:
    <html>
    <head>
    <title>Blah</title>
    </head>
    <body>
    <p><a href="test.html#blah">Click here</a></p>
    </div>
    </body>
    test.html
    Code:
    <html>
    <head>
    <title>Blah</title>
    </head>
    <body>
    <div id="test">
    <p><a href="index.html">Click here</a></p>
    <div>
    <br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
    <br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
    <br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
    <br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
    <div id="blah">
    <p>Hello</p>
    </div>
    </body>


  •  

    Posting Permissions

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