Sticky Header issue (two sections, make only one sticky - involves ACSS )

Hi all,

I’m scratching my head about an issue with my header. I have two sections in the Header Template provided by Bricks, but I only want the lower one to be sticky.

Since I’m using Automatic.css I thought it would suffice to give the lower section the .sticky class and enable auto-offset in ACSS (which would default to 0, just what I need).

So much for the theory, however I cannot –for the life of me– get it to actually work.

Sticky behaviour in Bricks header is disabled (as it would default to the entire header, which includes both my sections, respectively image (above) and nav bar(below)).

Maybe someone has come across this issue and has a pointer or two. I think I’ve tried every possible combination of smooth-scrolling on or off, offset settings and what not. There seems to be a rather obscure secret to this… :wink:

Best Regards,
SVT

Welcome to the forum!
I have moved the thread to “How to” because this is not a bug. Since both sections are inside #brx-header, position: sticky does not work because the entire header scrolls out of the viewport.

You can create a section template with your sticky section and insert it between the header and the main content using the “bricks_after_header” hook:

Best regards,
timmse

Thanks for your reply but none of this makes the section sticky I’m afraid.

I’ve added it exactly as you stated, decoupled it from the header template, displayed on entire website, using bricks_after_header hook, tried to make it sticky with Brick’s own position: sticky + top:0 setting as well as with the ACSS .sticky class but none of it works.

tbh, this has been a rather frustrating experience so far, considering this is not the only thing that’s simply “not working as advertized”. I’m slowly losing patience with this builder.

I mean come on, even Jimdo’s editor can make a navigation bar sticky and not the header above it. Effen JIMDO, you guys! :smiley:

I don’t know that we advertise this anywhere in any form, but it works perfectly fine for me: CleanShot 2023-11-09 at 15.54.33 · CleanShot Cloud

You’re right. From my point of view, the feature is rather “missing” than “not working as advertized”. My apologies.

Thank you for trying it and for sharing your screenshot, it got me to the solution I needed.
I was missing the z-index setting in addition to the other steps required.

That was a frustrating to iron out before I made my way to the forum tbh. I would expect a section to be sticky when I set it to be “sticky”. Maybe that’s just me being a dummy but I wonder how many people are facing this issue? This seems like such a basic feature for a(ny) builder and it could perhaps be considered to be added as such.

Thanks again and with regards to my other issues, I’m afraid you’ll see me again in other topics of this board ;D