Hello everyone,

I was a little embarrassed today as I was presenting my portfolio to a potential client I took him a site I created which contains a named anchor. When I pressed it it didn't go "back to top"; it stayed put.

After further investigation it furns out that it works in IE but not in Firefox. I have FF2 on my laptop since it's an older P3, and I have FF3 on my desktop. It doesn't work in either version. If I go to IE, however, it takes "back to top". Any reason why? Here is the link to the page.
http://www.sweettoothdaintycakes.com/Our%20Cakes.html#top

After the body tag, throw in <a name="top"></a>

<body style="background-color:#4b2600;" onload="MM_preloadImages('images/home_over.gif','images/our-cakes_over.gif','images/Gourmet-Gifts_over.gif','images/Order_over.gif','images/Wholesale_over.gif','images/faq_over.jpg')">
<a name="top"></a>

Thanks. I'll try that.

Have you tried it out yet?

The reason it is not working in ff is that you do not have an element named top. The reason it works in ie is because it goes to the top and scrolls down, it can;t find it so stays at the top. FF is a little more cleve and will just go straight to #top. It can't find it so it stays put. Also move your css to a seprate file that way you only have to load it once rather than on every single page. Saves both time and bandwidth.

Seems omol solved it. Please click solved.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.