Posted by Harlan Messinger on 10/31/07 12:24
Bernhard Sturm wrote:
>
> Hi Group,
> We are currently testing a site: http://wwwt.ichschweiz.admin.ch/ which
> has a 'top of page' navigation at the bottom of each page (pointing to
> an anchor at the top of the html-structure).
> The problem is, that this 'top of page'-navigation doesn't seem to work
> with Firefox (2.0.0.9 / Windows XP). IE has no problem with the link. I
> am sure I made something wrong, but I can't figure out where I missed
> the right turn. Could some of you have a look at it, and tell me where I
> missed it?
You have a div with id="top" and an anchor with name="top". This is
incorrect HTML:
http://www.w3.org/TR/html4/struct/links.html#anchors-with-id
Firefox sees two different elements that could be the destination for
the link and therefore can't react to it. (The fact that they are nested
or adjacent is irrelevant.) IE probably handles the flawed code by
ignoring the A tag because by that point it has already registered the
DIV tag as the "top" element.
The solution is to take the ID off the DIV and stick it in the anchor:
<div><a id="top" name="top"></a></div>
[Back to original message]
|