How do I return to top using css? I have tried to use [a id="top"]return to top[/a] and it worked dine using html, but now does not work.
How do I insert a 'return to top' attribute?
Page 1 of 12 Replies - 2403 Views - Last Post: 28 August 2012 - 08:01 AM
Replies To: How do I insert a 'return to top' attribute?
#2
Re: How do I insert a 'return to top' attribute?
Posted 28 August 2012 - 03:44 AM
You don't do it using CSS. CSS stands for Cascading StyleSheets - meaning it's intended for defining the appearance of elements on your web page.
To add a functional "go to top" link, you need to do the following:
1) At the start of your "top" (usually after your body tag), add an anchor tag with a 'name' attribute (I recommend "top").
2) Wherever you intend to place your "go to top" link, set its target URL to be a hash tag (#) followed by the value of the name attribute.
To add a functional "go to top" link, you need to do the following:
1) At the start of your "top" (usually after your body tag), add an anchor tag with a 'name' attribute (I recommend "top").
2) Wherever you intend to place your "go to top" link, set its target URL to be a hash tag (#) followed by the value of the name attribute.
<a name="top" /> <!-- Rest of your code here... --> <a href="#top">Go To Top</a>
#3
Re: How do I insert a 'return to top' attribute?
Posted 28 August 2012 - 08:01 AM
Thank you, that clears it up for me

Page 1 of 1