Whats another way I can jump my page from the bottom of the page with a "Back to Top" link without adding an empty #top div right after the body? Is there any way to do this without adding an extra div? I can probably add an id to the body but would want to avoid that if possible
You need to put an id on some element at the top of the page (or use an existing id on an element up there). It doesn't matter if it's the body, the h1 or an existing div.
Out of curiosity, is there a particular reason why you don't want to put an id="top" on the body element?
How about just:
<a href="#">Back to Top</a>
I've found that gives problems with certain CMSs.
This topic is now closed. New replies are no longer allowed.