View Full Version : Top Of Page Link
I have used the following code to provide a link at the bottom of my page back to the top that works in IE and FF. The dilema is however this location is below my nav and header and therefore not really the top of the page at all , it's the pages title. Is there another way of doing this so that it goes right to the very top of the page including the header image as well. The code I used is:
<div class="header9"><a name="top">Heavenlee Acres Camping Rates</a></div>
The actual link is;
<div class="navbar3">
<ul>
<li><a href="#top"> Top of page</a></li></ul></div>
Moshambi
11-28-2007, 03:32 AM
did you try to put the < a href = "top"> closer to the top of the page where you wanted it to take your users? i did a little test on my own and put the top of page link in my <head> section and it did it fine...maybe that will work?
djr33
11-28-2007, 03:57 AM
<a href="javascript:window.scrollTo(0,0);">Top</a>
The target method can work too, though this is simpler (but does require Javascript).
<a href="javascript:window.scrollTo(0,0);">Top</a>
The target method can work too, though this is simpler (but does require Javascript).
May I ask you to please post the entire code to this solution. I did what you suggested and it works then breaks. When you say require java script is there something more I need to add besides what you have posted?
Is there another way of doing this so that it goes right to the very top of the page including the header image as well.Put the link around the top element of the page.
It's a beautiful thing.. Thank you.. Why is it the most simplest of things seem to stump one. The key word was.. "element".. so simple.
Rockonmetal
11-28-2007, 11:36 PM
You can do this...
<html>
<head>
//All the goodies in here for your page...
//More goodies IDK what you put in here...
</head>
<body>
<a name="#Top" />
</body>
<html>
Basically just place it like that, if that doesn't work... then do this instead of this:
Good:
<a name="#top"> </a>
If this don't work use above...
<a name="#top" />
Its case sensitive so be careful!
Hope this helps
djr33
11-29-2007, 12:06 AM
Case sensitive? Just the name, itself.
I'm not sure why that didn't work. Haven't used it myself. Appears to be a very simple code.
Look at the link on this page, "[Jump to Top of Page]"
I didn't do anything special to that, just copied the [pseudo] URL from that.
Moshambi
11-29-2007, 04:58 AM
you are still having trouble with this problem grey? have none of these worked?
tech_support
11-29-2007, 08:39 AM
If a person has thanked the post, assume that the problem is fixed. ;)
Oh my yes they all worked, thank you for caring. The key phrase I wasnt grasping was "the top ELEMENT of the page". Thsi jarred my brain and of course it made total sense. Thanks again for following up though, I appreciate it. :)
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.