Archived topic
Customizing header - sticky
5 replies · Started by leonardoiann on October 24, 2022
Hey guys,
I'm customizing with GB my header this way: Elements --> block --> site header. Is it possible to add a sticky effect to entire header?
Hi there,
it would require CSS. Can i see the site where this header is ?
Hi David,
i'm training with localwp so unfortunately I can't share. Anyway, it's good to know that there isn't a direct function but it needs css instead. Are there any examples? I looked for them but couldn't find anything. Thanks
Ok, so try this:
1. you block element, i assume it starts with a GB Container Block. Select that - and in Advanced > Additional CSS Class(es) add: sticky-header
2. Add the following CSS to your site:
.sticky-header {
position: sticky;
top: 0;
}
It works perfectly! Thanks David
Glad to hear that