digital theme make announcement bar sticky

Solved

digital theme make announcement bar sticky

urbantis
Shopify Partner
212 0 62

How can I make the accnouncement bar sticky? Just announcement bar, not the whole header:

https://eatexcellence.com/

Thanks

Accepted Solution (1)

jordancarey
Shopify Partner
6 1 1

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!

View solution in original post

Replies 5 (5)

Small_Task_Help
Shopify Partner
1054 45 101

Hi,

Hope this will help

- At css file add below css

CSS example

.announcement-bar {
  position: sticky;
  top: 0;
  z-index: 9999;
}
To Get Shopify Experts Help, Click Here or E-mail - hi@ecommercesmalltask.com
About Us - We are Shopify Expert India
At Google My Business - Ecommerce Small Task - Hire Shopify Developers Ahmedabad

jordancarey
Shopify Partner
6 1 1

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!

urbantis
Shopify Partner
212 0 62

Thanks, this one worked

Darshan17
Shopify Partner
26 2 4

Hi Urbantis, 

It looks like overlapping issue, please use my css to fix this. 

Darshan17_0-1746794220585.png


Thanks! 

 

If this fixed your issue, a Like and marking it as a Solution would mean a lot!
Shopify Developer | Helping eCommerce Stores Grow – cmsMinds (Shopify Partner)
Need help improving your Shopify store to stay ahead of market trends or need expert support?
 Connect with me at ujjawal@cmsminds.com

Darshan17
Shopify Partner
26 2 4

 

Announcement bar sticky without overlapping the header

Follow these steps to apply the fix via the Shopify admin panel:

  1. Go to your Shopify Admin → Click on Online StoreThemes → Click ActionsEdit Code

  2. Under Assets, find and open the file named base.css. 

  3. 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.

  4. 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.

If this fixed your issue, a Like and marking it as a Solution would mean a lot!
Shopify Developer | Helping eCommerce Stores Grow – cmsMinds (Shopify Partner)
Need help improving your Shopify store to stay ahead of market trends or need expert support?
 Connect with me at ujjawal@cmsminds.com