tags:

views:

28

answers:

2

Heya,

I have some target elements (<div name="target">) in my document and links to them are inside a fixed positioned element. (<a href="#target">).

Somehow the anchors and links don't work by default. Clicking the link inside the fixed positioned element doesn't do anything (the page doesn't scroll to where it should).

Target element has no gimmicks. It's just a div element inside few other div's.

+5  A: 

IIRC, you need to assign an id instead of a name when doing this for elements other than <a> tags.

Pekka
+1, you do recall correctly :-) *name* is actually removed from HTML5 for *IMG*, *FORM* and *A* elements. http://www.w3.org/TR/2008/WD-html5-diff-20080610/#absent-attributes
Andy E
@Andy cheers for the reference!
Pekka
ah, thanks a lot. wasn't aware about that :)
veturi
+1  A: 

By doing this:

You're effectively saying that the link must go to an element in the document where the id is named "target"

so change,

<div name="target">

to

<div id="target">
The Elite Gentleman