Site logo

Archived topic

Element inside sticky header

7 replies · Started by WebbPlatsen on November 29, 2022

Viewing posts 1–8 of 8

I have a Header Element which is placed below header.
How do I place this Element inside sticky header?

Hi there,

What do you have in the Header Element?

Full width Page Hero and height is 40px.

Can i see this ?

Sure. Here u go.

Ok, so i would appraoch it like so, but it will probably require some CSS:

1. remove the header elements
2. use a Hook Element to add your element to the generate_after_primary_menu hook.
3. Set the Customizer > Layout > Primary Navigation width and inner width to Full width.

This will add the element inside the nav, so when it gets cloned for the sticky nav, then you should keep it.
I can assist with the CSS if i can see it ?

Thanks!

Element will now be sticky in Desktop :)
Content won't be shown but that's another question I guess.
Mobile view will not be full width so I guess I some CSS.

To keep it visible on mobile and in the same place add this CSS:


#ybdocatcontainer_top {
    order: 10;
    flex: 1 0 100%;
}

Good question - what happened to the content ?

This archived topic is closed to new replies.