Shopify themes, liquid, logos, and UX
How can I make the accnouncement bar sticky? Just announcement bar, not the whole header:
Thanks
Solved! Go to the solution
This is an accepted solution.
Hey there, this site's looking great! I took a quick look at the theme you're using, and it looks like making the announcement bar on the Digital theme sticky is going to need some custom CSS. You can put it in the custom CSS section at the bottom of the announcement bar settings:
.announcement-bar {
position: fixed;
width: 100%;
}
I recorded a quick video of where to find the custom CSS setting and how the code works just in case you or anyone else would find it helpful:
Let me know if you need help with anything else!
Hi,
Hope this will help
- At css file add below css
CSS example
.announcement-bar {
position: sticky;
top: 0;
z-index: 9999;
}
This is an accepted solution.
Hey there, this site's looking great! I took a quick look at the theme you're using, and it looks like making the announcement bar on the Digital theme sticky is going to need some custom CSS. You can put it in the custom CSS section at the bottom of the announcement bar settings:
.announcement-bar {
position: fixed;
width: 100%;
}
I recorded a quick video of where to find the custom CSS setting and how the code works just in case you or anyone else would find it helpful:
Let me know if you need help with anything else!
Thanks, this one worked
Hi Urbantis,
It looks like overlapping issue, please use my css to fix this.
Thanks!
Announcement bar sticky without overlapping the header
Follow these steps to apply the fix via the Shopify admin panel:
Go to your Shopify Admin → Click on Online Store → Themes → Click Actions → Edit Code
Under Assets, find and open the file named base.css.
Search for this class:
.shopify-section-header
➤ Remove the line that says:
z-index: 12;
This helps prevent layering issues when fixing the announcement bar.
Now search for .announcement-bar in the same CSS file.
➤ Add the following CSS properties to make it fixed at the top:
position: fixed; width: 100%; top: 0;
This will fix the announcement bar at the top of the page without overlapping the header.
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025