Home › Forums › CSS › [Solved] Using an anchor tag with a navigation bar set as positon: fixed › Reply To: [Solved] Using an anchor tag with a navigation bar set as positon: fixed
The anchor tag puts the content at the top of the page, but I want it to place the text about 65 pixels from the top of the page because the navigation bar is 55 pixels high.
This sounds like an offset issue.
The linked item will always come to the top of the page and so be covered by the fixed position navbar.
So you need to find some way of adding the offset (65px I think you said) to the position of the anchor.
Just adding padding-top of 65px to the anchors should do it.
http://stackoverflow.com/questions/4086107/html-positionfixed-page-header-and-in-page-anchors
..or there is the pseudo-element method
http://nicolasgallagher.com/jump-links-and-viewport-positioning/
I’m assuming these are just normal anchor links…no JS/JQ involved?