-
Arnoud
I’m wondering how to set up a sticky logo that only appears when I enable the header element as sticky on desktop.
In the old setup, I could configure a sticky header via the Customizer under Layout → Sticky Header, but that doesn’t work when using Elements.
Currently, I have:A header block placed on the “Above Header” hook, containing a Navigation element with the primary menu
A separate Site Header Element with a large logo on the left and a secondary navigation on the rightWhat I’m trying to achieve:
When I scroll down, the primary navigation becomes sticky
At that point, I only want to show a small logo inside that sticky navigation
This small logo should not be visible when the sticky navigation is not activeThe sticky site header only works properly when set to “Always Sticky”.
With the other options, a gap appears between the header bar and the menu, and the menu overlaps the logo.image: https://postimg.cc/MvP91fk0
How can I set this up correctly?
-
Hi there,
1. Add your logo to the Menu container block, and add a class to the image block, eg.
logo.
https://app.screencast.com/BzU7W9vdP7BsZ2. Set the logo image’s
displaytonone.
https://app.screencast.com/RAVaIclfV0PsV3. Select the Site header block, click the manage selector button, and create a new selector
&.gb-is-sticky .logo, and set itsdisplaytoblock.
https://app.screencast.com/ExFaIdUetuVxR -
Arnoud
Thank you very much, this works!
-
Glad to hear that 🙂
- You must be logged in to reply to this topic.