P
PCUBED
New Member
I am using anchors to navigate between sections on my one-page website. I have custom CSS to offset the anchor with my sticky header. In my menu/header, I have custom links that use the url of my website with the #"anchor name" at the end.
My problem is that when I first load my page, if I don't scroll and just click a link in the header, the offset doesn't work. Only after I scroll down 1px (or more) and click a link in the header does the offset work. It should also be noted that if I scroll down and then scroll back to the top and click a link in the header, the offset still doesn't work.
I think the problem has something to do with the shrinking sticky header (it shrinks to a smaller size once I start scrolling). Whenever I click a header link below the top of the page, the offset works, whenever I click a link at the very top (with the enlarged header),it doesn't.
I checked to make sure the issue isn't that the header stays large when a link is clicked at the top of the page. It still shrinks during the scrolling animating.
Anyone know how to fix this?
My problem is that when I first load my page, if I don't scroll and just click a link in the header, the offset doesn't work. Only after I scroll down 1px (or more) and click a link in the header does the offset work. It should also be noted that if I scroll down and then scroll back to the top and click a link in the header, the offset still doesn't work.
I think the problem has something to do with the shrinking sticky header (it shrinks to a smaller size once I start scrolling). Whenever I click a header link below the top of the page, the offset works, whenever I click a link at the very top (with the enlarged header),it doesn't.
I checked to make sure the issue isn't that the header stays large when a link is clicked at the top of the page. It still shrinks during the scrolling animating.
Anyone know how to fix this?