Shopify themes, liquid, logos, and UX
Cannot make the announcement bar sticky. Any solutions?
Solved! Go to the solution
This is an accepted solution.
Hi @ProceptMarketin ,
1. Go to Online Store -> Theme -> Edit code.
2. Open your theme.liquid file
3. In theme.liquid, paste the below code before </head>
<style>
.announcement-bar {
position: fixed !important;
top: 0;
left: 0;
width: 100vw;
}
.site-header-sticky .site-header {
top: 47px !important;
}
</style>
If my reply is helpful, kindly click like and mark it as an accepted solution.
Thanks!
This is an accepted solution.
Hi @ProceptMarketin ,
1. Go to Online Store -> Theme -> Edit code.
2. Open your theme.liquid file
3. In theme.liquid, paste the below code before </head>
<style>
.announcement-bar {
position: fixed !important;
top: 0;
left: 0;
width: 100vw;
}
.site-header-sticky .site-header {
top: 47px !important;
}
</style>
If my reply is helpful, kindly click like and mark it as an accepted solution.
Thanks!
This worked perfectly. Thank you!!
https://coastalpumps.com/products/2024-10x8-trailer-mounted-pump-package
If you see here, i'm having some issues with this code we implemented causing overlay on the page. The title is cut off
Step 1: Go to Shopify Admin -> Online Store ->Theme -> Edit code
Step 2: Search file theme.liquid
Step 3: Insert this code above </head> tag:
<style>
.announcement-bar {
position: fixed!important;
width: 100%;
top: 0;
}
header {
top: 48px!important;
margin-top: 48px!important;
}
</style>
result:
If it helps you, please like and mark it as the solution.
Best Regards 😍
B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.
B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.
B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.
BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now
Hi @ProceptMarketin,
Step 1: Go to Shopify Admin -> Online Store ->Theme -> Edit code
Step 2: Search file theme.liquid
Step 3: Insert this code above </head> tag:
<style>
.announcement-bar {
position: fixed !important;
top: 0;
left: 0;
width: 100vw;
}
.site-header-sticky .site-header {
top: 48px !important;
}
</style>
Here is result:
Hope this can help you,
If our suggestions are useful, please let us know by giving it a like or marking it as a solution. Thank you 😍
Sale banner, pop ups: Customize your sale banner, pop-ups and create countdown bar to boost conversion rate.
Simicart: Transform your Shopify store into a stunning and fully functional mobile app with just a few simple steps.
Product Labels & Badges: Get more sales with striking labels, badges, and banners from our 10,000+ available templates.
BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month now
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025