Add padding to announcement bar

Add padding to announcement bar

Nattlig
Tourist
12 0 8

Can someone help me add some padding to the grey announcement bar? I want more padding on the top and bottom. 

 

Here is the store url: https://nattlig.no/

 

Thanks!

Nattlig_0-1725973398136.png

 

Replies 6 (6)

dws_pvt_ltd
Shopify Partner
330 65 92

@Nattlig, Hello! Please follow these steps to add this CSS code:
1. Go to your Online Store
2. Click on "Themes"
3. Select "Edit code"
4. Open your CSS file. If you have a custom CSS file, open that instead.
5. If you can't find your custom CSS file, open base.css" OR "theme.css".
6. Add the following code at the end of the file.

 

Search this ".annoucement-bar-top" class and add padding to that or add new CSS.

 

.annoucement-bar-top {
    padding: 10px 0px;
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-around;
}
/* OR */
slideshow-component.announcement-bar {
    padding: 10px 0px;
}

 

 

dws_pvt_ltd_0-1725973827320.png

 

 

Feel free to reach out if you have any questions or need assistance.
Best Regards,
DWS.

Helpful? then please Like and Accept the Solution.
For any inquiries, please feel free to contact via WhatsApp and Email: [email protected].
For more information visit our website Dolphin Web Solution Pvt Ltd.

DaveedValencia
Shopify Partner
26 5 5

Add the following CSS to your theme. You can change the top and bottom to any px font you'd like, I put 10px but change them to 5px or 20px based on your preference.

 

.announcement-bar{
padding-top:10px!important;
padding-bottom:10px!important;
}

 

BSSCommerce-B2B
Shopify Partner
1738 522 584

Step 1: Go to Shopify Admin -> Online Store ->Theme -> Edit code

BSSCommerceB2B_0-1725973740289.png

 

 

Step 2: Search file theme.liquid

Step 3: Insert this code above </head> tag:

<style>
.annoucement-bar-top {
  padding: 10px!important
}
</style>

result: 

BSSCommerceB2B_1-1725973782688.png

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

Tech_Coding
Shopify Partner
309 81 72

Hello @Nattlig 

You can add code by following these steps

1. Go to Online Store -> Theme -> Edit code.
2. Open your theme.liquid file

3. Paste the below code before </body> on theme.liquid
<style>
 .announcement-bar__announcement {
     padding: 10px;
  }
</style>

Tech_Coding_0-1725974467073.png

my reply helpful? Click Like to let me know!
your question answered? Mark it as an Accepted Solution.

my reply helpful? Click Like to let me know!
your question answered? Mark it as an Accepted Solution.
Shopify UI Developer
Your Coffee Tips adds a little sweetness to my day.

BSS-TekLabs
Shopify Partner
2350 702 827

- Here is the solution for you @Nattlig 
- Please follow these steps:

z5686811214059_e66de1953f1db631f9134af5cdb796ad.jpg

- Then find the theme.liquid file.
- Then add the following code at the before tag </head> and press 'Save' to save it.

<style>
.annoucement-bar-top {
    padding: 8px 0 !important;
}
</style>

- Here is the result you will achieve:

BSSTekLabs_0-1725974727424.png

 

- Please press 'Like' and mark it as 'Solution' if you find it helpful. Thank you.

If our suggestions are useful, please let us know by giving it a like or marking it as a solution.


Salepify: Efficiently increase sales conversion with sale-driven features like auto add to cart, free gifts (free plan available)


Salemate: Boost your AVO with 2-layer offer, countdown upsell in your post purchase page


BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month now

PageFly-Richard
Shopify Partner
4668 1069 1726

Hi @Nattlig 

 

This is Richard from PageFly - Shopify Page Builder App

 

Please add this code to your theme.liquid above the </head> to get this solved

Step 1: Online Stores > Themes > More Actions > Edit code

Step 2: click on theme.liquid and paste the code above the </head>

<style>
.annoucement-bar-top{
padding:10px!important;
}
</style>

 

Hope this can help you solve the issue 

 

Best regards,

Richard | PageFly 

Please let me know if it works by giving it a Like or marking it as a solution!


➜ Optimize your Shopify store with PageFly Page Builder (Free plan available) 


All features are available from Free plan. Live Chat Support is available 24/7.