Text in announcement banner spacing is off

Topic summary

A user reported uneven vertical spacing in their store’s announcement banner on mobile view, with the bottom padding appearing larger than the top.

Initial Assessment:

  • Another user examined the banner and found the spacing appeared equal, suggesting it might be a visual perception issue.

Solutions Provided:
Two CSS-based fixes were offered:

  1. Generic approach: Add .announcement-bar__message { min-height: auto !important; } to the theme’s CSS file (base.css, style.css, or theme.css)

  2. Targeted approach: Add a section-specific CSS rule setting height to 30px and centering content with align-items: center

Both solutions involve editing the theme code through Shopify admin → Online Store → Themes → Edit code.

Outcome:
The original poster confirmed the issue was resolved with a thank you, though they didn’t specify which solution was implemented.

Summarized with AI on October 31. AI used: claude-sonnet-4-5-20250929.

Hiya, this is the mobile view for my store. I feel like the space from the bottom is greater than the top. How can I fix it? Thanks.

1 Like

Hi @nikkiken , can you share your store url?

@nikkiken , The spacing at the top and bottom appears to be the same:

Abdosamer_0-1739990921568.png

Hi @nikkiken

Try this one.

  1. From your Shopify admin dashboard, click on “Online Store” and then “Themes”.
  2. Find the theme that you want to edit and click on “Actions” and then “Edit code”.
  3. 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:
.announcement-bar__message {
    min-height: auto !important;
}

Please don’t forget to Like and Mark Solution to the post that helped you. Thanks!

1 Like

Hi @nikkiken

You can try to follow this step
Step 1: Go to Edit code
Step 2: Find file base.css and add this code at the end of the file

div#shopify-section-sections--23077178507529__announcement-bar * {
    height: 30px !important;
    align-items: center !important;
}

Result:

Best,

Liz

Thank you so much!