Make announcement bar and header to be no space between them on DESKTOP ONLY
Topic summary
Goal: remove the gap between the announcement bar and header on desktop in a Shopify store (Dawn theme).
Proposed fix (with steps):
- In Online Store > Themes > Edit code, open Assets and edit the theme’s CSS file (base.css/style.css/theme.css).
- Add: section#shopify-section-template–23623344161057__image_banner_Y4KK6n { margin-top: 0; }
- Save. A screenshot was shared to show the expected result.
Issue encountered:
- The change in base.css didn’t affect the layout. The user did not find style.css or theme.css and confirmed they are using Dawn.
Latest guidance:
- If the code edit doesn’t work, add the CSS via the Theme editor: select the banner section and paste the rule into the Custom.css panel on the right.
Notes:
- The request was for desktop only, but the provided CSS is not limited to desktop (no media query shown).
- Status: unresolved/awaiting confirmation whether adding the CSS to Custom.css fixes the spacing. An image was included to illustrate the desired outcome.
1 Like
Hi @Mrstep
Try this one.
- From your Shopify admin dashboard, click on “Online Store” and then “Themes”.
- Find the theme that you want to edit and click on “Actions” and then “Edit code”.
- In the “Assets” folder, click on “base.css, style.css or theme.css” file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:
section#shopify-section-template--23623344161057__image_banner_Y4KK6n {
margin-top: 0;
}
-
And Save.
-
Result:
Your Feedback Matters! Please mark the solution and give likes to posts that helped you. Your appreciation fuels our motivation to assist you better!
I saw base. and inserted it but still the same. I did not see style.css or theme.css. I am using the Dawn theme if that is helpful
If it’s not working, try pasting it into Custom.css in the Theme editor. Click on the banner, and you’ll see Custom.css on the right.
