Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Automatically scrolling past fixed navigation while linking within the same page Re: Automatically scrolling past fixed navigation while linking within the same page

#107026
Paulie_D
Member

It’s difficult to help without a link but this “I have a fixed horizontal navigation across the top of the page.” is your problem.

You’ve told the navigation to stay fixed regardless of what the content does…so it does.

My suggestion is to have the navbar sit on top of the content column ONLY and then everything should work as you expect. I wouldn’t go the fixed number of pixels route as you will have to update those numbers every time you update the content.

At best, I would see if you can ask someone here to help you out with a little jQuery to scroll to the anchor and then scroll back a set number of pixels to allow for the height of the navbar. If you see what I mean.