Archived topic
sticky navigation covers anchors (section title)
5 replies · Started by Marco on July 18, 2021
hello
I basically have a one-pager with a menu at the top - I'm using the sticky navigation - it disappears when scrolling down - when clicking on a menu item the page scrolls down to the desired section - all good - however since the sticky navigation reappears when scrolling up the the desired anchor is further up I do not see the title of the section because it gets covered by the sticky navigation - is there a way to prevent this - I was hoping that there would be some additional class I could use to find out whether the sticky navigation is visible and in that case give the content container some additional top-padding - I hope you have an idea how to fix this - thank you in advance for your input.
Hi Marco,
Can you make sure that you are using the smooth scroll option in GP?
Take a look at this doc and video:
https://docs.generatepress.com/article/smooth-scroll/
all the sections have the "smooth-scroll" class as well as an #ID
Hi there,
the smooth-scroll class has to be aded the link element ( not the section it scrolls to ).
If theres still an issue - can you share a link so i can take a look.
I'm using Elementor - so there is a section, at least that is what I call them and then there is a title - the section is basically the anchor - the smooth scrolling works just fine - I don't think that is the issue - it is just when I select an item that is basically further up that the heading of the section is covered by the sticky navigation - it would be very helpful if there is a way to figure out whether the sticky navigation is visible and if so add some additional top padding in order to move the content container down so the heading would not be covered anymore by the sticky navigation.
you can check it out here: https://aicadium.ai/dev/
hope this clarifies the situation
If you're using Elementor then it has its own smooth scroll feature which is probably what you're seeing.
You would need to ask their support on how to offset the scroll position.