Forum Moderators: not2easy
I've coded a site that is HTML 4.01 Transitional, and everything is fine with one maddening exception. My "top of page" link doesn't work in IE6. It's just an anchor link, and it works fine in Mozilla, but not IE6.
Here's the weird part - if I take out the DOCTYPE, it works fine. Put it back in, it breaks.
Anyone have any experience with this?
I think most browsers recognise that <a href="#top"> should take you to the top of the page without setting a bookmark, so might IE unless it's in quirks mode.. which would explain why it works when you remove the DTD.
try <body id="top"> or if you've a header at the top of each page add id="top" to it..
Suzy
Ive looked at your page, BTW it is not allowed to post personal URL's, and i have some suggestions.
your anchor looks like this:
<a name="pagetop"></a>
<div id="masthead"><h1><a href="/collegian"><span>The Collegian</span></a></h1></div> try it like this instead:
<div id="masthead"><h1 id="pagetop"><a href="/collegian"><span>The Collegian</span></a></h1></div> Remove the named anchor and substitute it with the <h1> with an id of pagetop. That should work in both ie and moz.
On a smaller note you have an ID and a CLASS with the same name "pagetop". although this is perfectly legal it could potentially lead to problems.
Hope this helps
Kind regards
Hafnius