Forum Moderators: open

Message Too Old, No Replies

Back to top marker

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

         

Uzil

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?

coopster

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

WebmasterWorld Administrator 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?

milanmk

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

10+ Year Member



JavaScript Solution

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

Hope it helps.

Milan

Robin_reala

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’

bluesmandeluxe

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

10+ 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.