Welcome to WebmasterWorld Guest from 54.167.175.218

Forum Moderators: incrediBILL

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)

10+ Year Member



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



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)

5+ Year Member



JavaScript Solution

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

Hope it helps.

Milan

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

WebmasterWorld Senior Member 10+ Year Member



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)

5+ Year Member



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.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month