January 24th, 2013, 09:19 AM
Positioning anchor links
I have an index at the top of may page which are links to local anchors (obviously this is an FAQ page), typically.
<a href="#q1">Why does it tell me I have already downloaded my application?</a>
When that linked is clicked, I want the anchor to be positioned at the top of the page. To do that I found some suggestions using CSS for the anchors. Without the CSS the links work but are positioned wrong. With the CSS the links don't work at all. The anchors typically look like:
<a name="q1" id="q1" class="anchor"></a>
The CSS I tried is:
I don't think my CSS is wrong so I am guessing that my approach is wrong. Can someone help me accomplish what I want? TIA.
There are 10 kinds of people in the world. Those that understand binary and those that don't.