SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: Linking to a paragraph on another page

  1. #1
    SitePoint Addict Barnum's Avatar
    Join Date
    Oct 2008
    Posts
    366
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Linking to a paragraph on another page

    Thought I had this problem solved but apparently not.

    I want a link that will take the reader to another page, and a certain paragraph. I was using...

    <a href="nextpage.html#info"> info </a>


    and

    <h3 id="info"></h3> on the linked page.

    When I try it now it just takes me to the top of the linked page.

  2. #2
    Robert Wellock silver trophybronze trophy
    SitePoint Award Recipient xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,243
    Mentioned
    51 Post(s)
    Tagged
    0 Thread(s)
    The code sample you have posted is correct so long as you only have unique ID values it will take you to that H3. Perhaps your page doesn't have much content or the H3 is near the top of the other page, so the page doesn't need to scroll down?
    };-) http://www.xhtmlcoder.com/
    Thinking Web: Voices of the Community

    > March 2013 - SitePoint forums: Spot the Error 3: Calling all Sleuths! Winner Announced!... She knows how to spot simple <code> errors but do you?

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
  •