Archived topic
Sticky Secondry Menu not working.
5 replies · Started by Aamir on September 19, 2022
I tried to add the CSS code mentioned in other threads to make the secondary menu sticky with a header but nothing worked. Please help.
Hi there,
Can you link us to your site where we can see the secondary navigation?
And can you share the CSS code you are using right now?
Let me know!
Hi Ying. Here is the site URL - https://endlessdistances.xyz/
Try this CSS:
.site-header {
position: sticky;
top: 0;
z-index: 1000;
}
Thanks for the code.
That code makes the site header sticky.
But can we somehow hide the top menu when we scroll?
Thank You
Hi Aamir,
You'll need custom Javascript code to achieve that. This would be out of our scope of support. It would be best to reach out to a developer or try asking for recommendations in our Facebook Group: https://www.facebook.com/groups/1113359788719597
For reference, you'll need to detect the Scroll Event, then add a class for instance to the Nav, and with that class, hide it through CSS.