shaneR Posted February 19, 2007 Share Posted February 19, 2007 i'm currently writting a website using HTML and have a page which requires quite a lot of scrolling to reach the bottom. Could somebody please offer me some simple code to create a link at the top of the page which when clicked will jump to the bottom.THANKYOU.... Link to comment Share on other sites More sharing options...
pulpfiction Posted February 19, 2007 Share Posted February 19, 2007 The name in the href should match the ID of the element in the bottom of the page....<body><a href="#bottom">Bottom of page</a><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><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><div id="bottom">bottom of page</div></body> Link to comment Share on other sites More sharing options...
justsomeguy Posted February 19, 2007 Share Posted February 19, 2007 Does that work? I thought the destination had to be a named anchor:<a name="bottom"></a>Or maybe an ID instead of name for compliance. But I didn't think it worked with a div, or any arbitrary element other then an anchor. Link to comment Share on other sites More sharing options...
croatiankid Posted February 19, 2007 Share Posted February 19, 2007 name is deprecated , id is and should be used instead. Link to comment Share on other sites More sharing options...
pulpfiction Posted February 19, 2007 Share Posted February 19, 2007 Tried that in IE and seems to be working fine, not sure about other browsers..... Link to comment Share on other sites More sharing options...
justsomeguy Posted February 19, 2007 Share Posted February 19, 2007 Cool. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now