Welcome to WebmasterWorld Guest from

Forum Moderators: incrediBILL

Message Too Old, No Replies

Back to top marker

How can i make the marker 'back to top' work in Mozilla

3:08 pm on Oct 11, 2006 (gmt 0)

Junior Member

10+ Year Member

joined:Feb 20, 2004
votes: 0

Hello everybody
Does anybody know how to make the marker #top work for F.Fox and Mozilla.
I'm not actually looking for the marker for FF or Mozilla, I'm looking to find out a marker that works with every browser.

Unfortunatly <a href="#top">top</a> only works for IE.
Shouldn't this marker work for every browser?

4:10 pm on Oct 11, 2006 (gmt 0)


WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:July 31, 2003
votes: 1

That should work just fine in FF/Moz, even with an empty <a> anchor [w3.org]. Do you have the anchor named at the "top" marker?
4:57 pm on Oct 11, 2006 (gmt 0)

Full Member

10+ Year Member

joined:Jan 4, 2006
votes: 0

JavaScript Solution

<a href="javascript:window.scrollTo(0,0);">Back To Top</a>

Hope it helps.


9:18 pm on Oct 11, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:June 26, 2004
votes: 0

I believe IE lets you specify a fragment of #top without an element with an id of ‘top’ and it'll still work. This is rather weird, but hey.

The obvious fix is to give the first element in your page an id of ‘top’

4:28 pm on Oct 16, 2006 (gmt 0)

Junior Member

5+ Year Member

joined:Oct 10, 2006
votes: 0

Like Coopster saud, so long as you have the named anchor in position at the top <a name="top"></a>, then <a href="#top">top</a> anywhere in the document will work in any browser.