Help - Search - Members - Calendar
Full Version: Return to top of page see throughout webpage scrolling etc
HTMLHelp Forums > Web Authoring > Markup (HTML, XHTML, XML)
boutrous
A silly question which i do not have an answer for:

How can I place "Return to top of page" on a web page so that it appears, say at the upper right, as you scroll down? Code?

Does it have to be Java enabled or is there some code that can do this... hopefully not with menus

thanks

Boutrous
Darin McGrew
QUOTE(boutrous @ Mar 28 2007, 04:06 PM) *
How can I place "Return to top of page" on a web page so that it appears, say at the upper right, as you scroll down?
FWIW, every browser I've used has had at least one standard method to return to the top of the current page.
Effovex
What do you want to know? How to create a link that returns to the top of the page, or how to make it stay at the top right of the browser window?

If it's the former:

At the top of the page, create an object with an id, for instance
<a id="top"></a>
Then at the bottom of the page, create an object that sends to the top
<a href="#top">Go back to the top</a>

If what you want to know is how to make it stay to the top right corning, then you need to make the link at the bottom into
<a href="#top" style="position: fixed; top: 5px; right: 5px;">Go back to the top</a>

This won't work in versions of Internet Explorer older than IE7, but there are work arounds.
Peter1968
Or tell your visitors to press their Home key. smile.gif
boutrous
the latter would be more helpful. Will this work in firefox

thanks a ton

stay groovy wub.gif excl.gif excl.gif blink.gif
boutrous
Unfortunately does not work. i just do not want a link but want it to appear always on rhs when they are scrolling
non-profit
QUOTE(boutrous @ Mar 29 2007, 05:23 PM) *

Unfortunately does not work. i just do not want a link but want it to appear always on rhs when they are scrolling

Are you looking for position:fixed? See www.mpaf.org. Menus stay put when you scroll down.
pandy
No, they don't. Not in IE6 and below. wink.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.