Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Forum How-To (http://forum.bytesforall.com/forumdisplay.php?f=9)
-   -   How to make HTML Code for "Back to Top" work in Firefox (http://forum.bytesforall.com/showthread.php?t=9676)

New WordPress Fan Sep 14, 2010 10:46 PM

How to make HTML Code for "Back to Top" work in Firefox
 
In IE, the following code placed at the bottom of a page (without more) works perfectly to take you back to the very top of the page:

<a href="#top">Back to Top...</a>

However, this does not work in Firefox. In Firefox, the bottom link works only when the following is added somewhere near the top of the page:

<a name="top"></a>

The bottom link then takes you back only up to the exact level on the page where the "<a name="top"></a>" code appears; not to the very top of the page. (This is the same for either Firefox or IE).

How could I get the "<a name="top"></a>" code up into the logo area of the header (rather than just at the top of the center column of text)? Or, is there another way to get just the bottom code to work in Firefox (without the top code) to take you to the very top of the page, as it does in IE?

Many thanks!

Using WordPress 3.0.1, Atahualpa 3.5.1

lmilesw Sep 15, 2010 01:06 PM

There are several "go to top" and "scroll to top" plugins at wordpress.org. I would try one of those. I just tested the Dynamic To Top plugin and it worked fine.

New WordPress Fan Sep 18, 2010 01:58 PM

Thank you very much, Larry.

I also discovered an easy way to do this without using another plugin:

Just go to Atahualpa Theme Options>HTML/ CSS Inserts>HTML Inserts: Header,

and add the following code:

<a name="Top"></a>

Then the following code placed in a Widget Area below the loop, on each page:

<a href="#Top"> Back to Top… </a>

automatically takes you to the top on every page. This now works both in Firefox and IE.

lmilesw Sep 18, 2010 02:08 PM

Thanks for that tip... I will put that in my quiver.

lmilesw Sep 18, 2010 02:14 PM

Also I'm not sure if you meant to say a widget area below the loop but all you have to do is add <a href="#Top"> Back to Top… </a> to the top of the Below the Loop box. You don't need to add a new widget area.


All times are GMT -6. The time now is 06:56 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.