Hey there,
Does anyone know how to either code or an app that can create a menu bar like this that always stays under the header? The refrence website is https://lesdeux.com/collections/all and my website is www.renssnce.com
A user seeks help creating a sticky navigation menu bar that remains fixed below the header while scrolling, similar to the reference site lesdeux.com.
Two solutions have been provided:
CSS-based approach (mageplaza-cs):
position: stickytop: 44px (matching header height)Alternative implementation (namphan):
base.css file#main-collection-filters with:
position: stickytop: 0z-index: 2 for proper layeringBoth solutions use CSS position: sticky property without requiring apps. The discussion remains open for follow-up questions or clarifications.
Hey there,
Does anyone know how to either code or an app that can create a menu bar like this that always stays under the header? The refrence website is https://lesdeux.com/collections/all and my website is www.renssnce.com
Hi @renssnce ,
I am from Mageplaza - Shopify solution expert.
It can be achieved with CSS easily if you already have a menu bar. Here are the steps:
Get the current height of your nav; it is 44px in height.
Add CSS for your menu bar:
.menu-bar {
position: sticky;
top: 44px *equal to your nav's height*
}
I hope this helps, please leave a comment if you need further instructions !
Hi @renssnce ,
Please go to Actions > Edit code > Assets > base.css file and paste this at the bottom of the file:
#main-collection-filters {
position: sticky;
top: 0;
width: 100%;
z-index: 2;
background: #fff;
}