I use anchors a lot throughout my site. I now have a 60px navigation bar that runs across the top of the page thats using absolute positioning so there's no impact on anchors.
If I change that positioning to fixed - the bar will of course stay at the top of the screen but when someone clicks on an anchor there will be a little bit that's obscured by the black fixed bar at the top of the screen.
I've tried using this CSS however that seems to solve this by pushing down the text (including the anchors heading) and it seems to be OK:
a[name] {
display: inline-block;
margin-bottom: 60px;
}
Can anyone think of any gotchas that I haven't thought about?