Goal: make the Shopify store’s header and announcement bar “sticky” (remain visible while scrolling) in the Local theme.
Proposed solutions:
Add CSS in Online Store > Theme > Edit code > theme.css (or theme.css.liquid):
• For header: position: sticky; top: 0; high z-index (e.g., 999–9999). Example selector used: #shopify-section-sections–19397825560915__header.
• For announcement bar: position: sticky; top: 41%; z-index: 999 using selector #shopify-section-sections–19397825560915__announcement.
A screenshot was shared showing the expected sticky result for the header. CSS snippets are central to the solution. “position: sticky” is a CSS property that keeps an element fixed once it reaches a specified offset (top) during scroll.
Latest developments and issues:
One user cannot find theme.css and asked if editing layout/theme.liquid is appropriate (unanswered).
Another user reported the provided code did not work on their store and requested further help.
A separate user asked for help applying this to a different site.
Status: No confirmed resolution from the original poster; solutions provided, but implementation issues remain open.
Summarized with AI on December 12.
AI used: gpt-5.
I’d like to make the header and announcement bar sticky on scroll on my page. I know this has been asked a lot but I can’t seem to get it to work for my store (using Local theme).