Archived topic
Generate Elements Hook Sticky Menu
1 reply · Started by Dennis on September 7, 2021
Cheers together,
at the moment we need to add a sticky image/ad above our sticky mobile-menu.
The insertion is not the problem > thanks to generatepress elements.
But the image "lays" over our sticky menu
Is there something that we can add to push the "menu" below the ad?
Thanks in advance
Dennis
Hi there,
You'll need to write a custom JS script to prevent the ad from overlaying the menu.
Something that will toggle the sticky mode and change the top property value of the menu so it doesn't go behind the ad when they're both "position: fixed;".
You can workaround with the script I've created here but you'll have to modify the classes to your Hook element's classes and #mobile-header's classes. https://generatepress.com/forums/topic/sticky-second-navigation/#post-1616424