We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

How to create a sticky header that works across all devices?

How to create a sticky header that works across all devices?

jameschris21
Visitor
2 0 0

I want it to remain fixed at the top of the page as users scroll, without affecting the layout or responsiveness on mobile and desktop (More Information). Any tips on implementing this using CSS or Liquid?

Replies 2 (2)

topnewyork
Astronaut
1552 191 253
@media (max-width: 768px){
    .site-header {
       position: sticky !important;
}
}

@media (min-width: 769px){
 .site-header {
       position: sticky !important;
}
}
Need a Shopify developer? Hire us at Top New York Web Design
Boost Your Store Sales with Volume/Tier Discount Try Big Bulk Discount
Create New Shopify Store For Just 1$/Month

namphan
Shopify Partner
2777 358 407

Hi @jameschris21,

Please send the website link, I will check it for you

Coffee tips fuels my dedication.
Shopify Development Service
PageFly Page Builder Optimize your Shopify store (Free plan available)
Need help with your store? namphan992@gmail.com