I wanted to ask if it’s possible (with the usage of header settings or CSS) to create a “double header” with separate conditions using Bricks builder. I’m all good with creating a header with a scrolling effect as it’s quite simple using the header settings, but it seems impossible to give different settings for different blocks of the header. For example:
-Header has two containers blocks: a top container for the logo and a bottom container for navigation.
-Desired effect: the top container (with logo) scrolling up with scroll effect, while navigation bar remains visible (sticky header).
You wouldn’t really want to create 2 headers to achieve this. Instead, what you can do is hide containers when the user starts scrolling down the page.
On your Bricks website, once you start scrolling you’ll notice that #bricks-header gets the class “scrolling” added, which you can use to hide the containers. So, for example:
I’m trying to add this to a website too, same use-case as the OP, but I’m not finding it working well for me. I assume I’m doing something wrong but haven’t figured it out yet.
Even tried changing “0” to “0px” assuming that was missing, but still no change.
I added the CSS code to both the header container overall, and also tried on the first container (logo-container) which is the part I want to hide on scroll while keeping the second container holding the nav and phone icon to be always displayed.
Has anyone been able to get this to work properly? I assume I’m missing something.
Ah that seems to have worked! Thank you so much. Now just gotta figure out the transitions and stuff, haha. Added the logo to display:none when scrolled too which is the other part I needed. Thank you for the help!
Yes, you would just set the CSS transition on the element. You will also need to update the css as the header ID has changed to #brx-header, so it should look like the screenshot below. Also, be sure to set an initial height on the logo element.
I was looking for an answer too but I fixed it this way - This is to change the logo though (prob a lil late, but I found it through google so someone else might find it useful)