unknown gamer Posted March 19, 2008 Share Posted March 19, 2008 hi, i was wondering if there is a code to make it when you click a link it takes you to the top of the page.or do you just make a link then sends you to the same page and when it does that it kinda makes it look like it's jumping to the top? Link to comment Share on other sites More sharing options...
Ingolme Posted March 20, 2008 Share Posted March 20, 2008 Just put this at the beggining of the <body>:<a id="top"></a>And make a link to it from anywhere in the page like this:<a href="#top">Go to top</a> Link to comment Share on other sites More sharing options...
unknown gamer Posted March 21, 2008 Author Share Posted March 21, 2008 cool, Thanks. Link to comment Share on other sites More sharing options...
iyeru42 Posted March 28, 2008 Share Posted March 28, 2008 You can also get a link that does javaScript... onClick="scroll(0,0);" Which won't require an extra anchor. By the way, if you don't have an ID with the name you use, or just link to #, it goes to the top anyway. Be wary though, some people use SuperCSS where they call the following, # { color:#000; } But whatever, we don't want to get into that. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.