Shopify themes, liquid, logos, and UX
can't seem to make it sticky, tried messing around with code in the base.css and no luck. Any help would really be appreciated!
I am using the Shrine Theme!
Solved! Go to the solution
This is an accepted solution.
Maybe too much code. Please add this code to theme.liquid file, after <head> and save file
<style>
.shopify-section-group-header-group:has(#countdown-banner),
.announcement-bar-section { position: sticky; }
.shopify-section-group-header-group:has(#countdown-banner) { top: 0px; }
.announcement-bar-section { top: 43px; }
body .shopify-section-header-sticky { top: 81px }
@media (max-width: 749px) {
.announcement-bar-section { top: 34px !important; }
body .shopify-section-header-sticky { top: 70px !important; }
}
</style>
- Helpful? Like & Accept solution!
- Ryviu - Product Reviews & QA app: Import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Amazon Products Importer - Import Amazon Products to Dropship in Your Store!
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- En...Sign up now.
Hi @daknbiz
Please share the link to your store so I can check and give you the code
- Helpful? Like & Accept solution!
- Ryviu - Product Reviews & QA app: Import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Amazon Products Importer - Import Amazon Products to Dropship in Your Store!
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- En...Sign up now.
The custom liquid announcement bar at the top with the countdown timer, cant seem to make it sticky.
Please add this code at the bottom of your base.css file
.announcement-bar-section { top: 0; position: sticky; }
body .shopify-section-header-sticky { top: 38px }
- Helpful? Like & Accept solution!
- Ryviu - Product Reviews & QA app: Import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Amazon Products Importer - Import Amazon Products to Dropship in Your Store!
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- En...Sign up now.
Could you check it again, I added the code at the bottom of base.css on a new line. Still not sticky 😞
Maybe you caused something not right on your base.css file, please try to move that code to Custom CSS in Online Store > Themes > Customize > Theme settings and check again.
- Helpful? Like & Accept solution!
- Ryviu - Product Reviews & QA app: Import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Amazon Products Importer - Import Amazon Products to Dropship in Your Store!
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- En...Sign up now.
It worked for one of the announcement bars the free shipping one. But not for the countdown at the top.
Please update the code
.shopify-section-group-header-group:has(#countdown-banner),
.announcement-bar-section { position: sticky; }
.shopify-section-group-header-group:has(#countdown-banner) { top: 0px; }
.announcement-bar-section { top: 43px; }
body .shopify-section-header-sticky { top: 81px }
@media (max-width: 749px) {
.announcement-bar-section { top: 34px !important; }
body .shopify-section-header-sticky { top: 70px !important; }
}
- Helpful? Like & Accept solution!
- Ryviu - Product Reviews & QA app: Import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Amazon Products Importer - Import Amazon Products to Dropship in Your Store!
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- En...Sign up now.
perfect!! I just now can't seem to get it to save
Also, tried saving but it says "Online store editor cannot be published"
This is an accepted solution.
Maybe too much code. Please add this code to theme.liquid file, after <head> and save file
<style>
.shopify-section-group-header-group:has(#countdown-banner),
.announcement-bar-section { position: sticky; }
.shopify-section-group-header-group:has(#countdown-banner) { top: 0px; }
.announcement-bar-section { top: 43px; }
body .shopify-section-header-sticky { top: 81px }
@media (max-width: 749px) {
.announcement-bar-section { top: 34px !important; }
body .shopify-section-header-sticky { top: 70px !important; }
}
</style>
- Helpful? Like & Accept solution!
- Ryviu - Product Reviews & QA app: Import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Amazon Products Importer - Import Amazon Products to Dropship in Your Store!
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- En...Sign up now.
thank you so much it works!!!
Very welcome!
- Helpful? Like & Accept solution!
- Ryviu - Product Reviews & QA app: Import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Amazon Products Importer - Import Amazon Products to Dropship in Your Store!
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- En...Sign up now.
Hey Dan,
I ran into another issue. On Chrome and every other browser, it works perfectly. However, on Safari on my Mac there's a slight gap between the countdown banner and the announcement bar. Any way to fix this or could it just be a Safari issue?
Please update the code
<style>
.shopify-section-group-header-group:has(#countdown-banner),
.announcement-bar-section { position: sticky; }
.shopify-section-group-header-group:has(#countdown-banner) { top: 0px; }
.announcement-bar-section { top: 42px; }
body .shopify-section-header-sticky { top: 81px }
@media (max-width: 749px) {
.announcement-bar-section { top: 34px !important; }
body .shopify-section-header-sticky { top: 70px !important; }
}
</style>
- Helpful? Like & Accept solution!
- Ryviu - Product Reviews & QA app: Import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Amazon Products Importer - Import Amazon Products to Dropship in Your Store!
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- En...Sign up now.
okay so now on safari and every other browser there's no gap between the countdown banner and announcement bar. However, now there's a gap between the announcement bar and header.
thank you! I figured out how to fix it on my end 🙂
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