Shopify themes, liquid, logos, and UX
Return management just got easier! We’ve launched Customer Self-Serve Returns to all Shopify merchants. Click here to learn more!
Hi
I would like to create a sticky/fixed navigation menu on the mobile version of my site. I'm using the debut theme.
I've browsed through a lot of threads without any luck to solve this issue.
Thank you.
Please share your store URL & screenshot what do you want!
Thanks!
@dmwwebartisan my shop is: www.flaph.dk password: twayzi
When I scroll down on my mobile I want the header/navigation menu to be fixed/sticky, so that I shows all the time - this goes for all pages.
Hope this makes sense - otherwise please get back to me. 🙂
Please try this code 1. Go to Online Store->Theme->Edit code 2. Asset->/theme.css-->paste below code at the bottom of the file.
.site-header {
position: fixed !important;
background-color: var(--color-body);
width: 100% !important;
z-index: 100;
}
Thanks!
Fantastic buddy! I've searched for days on/off trying to solve this issue.
Thank you so much!
Oh I was a bit too fast.
When I look closer the header is now on top of the pictures and not moving up all the way. See enclosed picture.
Please try this code 1. Go to Online Store->Theme->Edit code 2. Asset->/theme.css-->paste below code at the bottom of the file.
@media only screen and (max-width: 749px){
#MainContent{margin-top: 3rem!important}
}
@media only screen and (min-width: 750px){
#MainContent{margin-top: 5rem!important}
}
Thanks!
@dmwwebartisan this almost did the trick. It still cuts off a microscopic piece of the picture. Anyway to fix this?
Otherwise this would still be a totally acceptable solution.
Cheers.
Please share screenshot
@dmwwebartisan Pictures enclosed - the difference is, as I said, reeeeeally small.
I just discovered that the header is also sticky in laptop mode etc. The changes should ONLY affect the mobile view.
User | RANK |
---|---|
133 | |
91 | |
77 | |
69 | |
43 |
Learn these 5 things I had to learn the hard way with starting and running my own business
By Kitana Jan 27, 2023Would you love to unleash the unbridled power of the Google Shopping Channel into your sho...
By Gabe Jan 6, 2023How can you turn a hobby into a career? That’s what Emmanuel did while working as a wa...
By Skye Dec 30, 2022