Announcement bar struggles

Topic summary

A user is troubleshooting CSS issues after making their header transparent on their Shopify store. The main problems include:

Primary Issues:

  • Excessive vertical spacing (padding) above and below announcement bar text
  • Announcement bar overlapping with the header
  • Announcement bar not displaying properly on mobile devices

Attempted Solutions:

  • Another user provided initial CSS code to address the transparency and positioning
  • Follow-up CSS targeting .announcement-bar__message with reduced padding and min-height was suggested
  • Code placement in assets/base.css was specified

Current Status:

  • The proposed CSS fixes have not resolved the spacing issue despite multiple attempts
  • A new problem emerged: menu colors appearing differently in the editor (brown) versus the live site (should be white)
  • Screenshots show the code placement and visual issues, but the discussion remains unresolved with the user seeking alternative solutions
Summarized with AI on October 31. AI used: claude-sonnet-4-5-20250929.

Hi,

I’ve made my header transparant with the code below. However, now my announcement bar forever does not look how I want it to. I need much less space above and below the text. Also it shoul dnot overlap with my header. And I want it to be fully shown on mobile. Can someone help? My store link: https://rednah.com/

.shopify-section-group-header-group.announcement-bar-section{ height: 40px; } .header-wrapper{ position: absolute; width: 100%; background: transparent; } .header-wrapper .header{ margin-top: 25px; }

{% endif %}

@RednahPowderDye

try this code


Thank you very much for this! Just one thing. How can I remove the space above and below the text as much as possible?

1 Like

@RednahPowderDye

Please add the following css code to your assets/base.css bottom of the file.

.announcement-bar__message {
    padding: 0.5rem 0 !important;
    min-height: 0.8rem !important;
}

Thanks!

I tried. But it didn’t change (see attached where I pasted the code). Perhaps something else I can try?

@RednahPowderDye

closing bracket missing please check follwing code and screenshot.

100% {
    transform: translateX(100%) scaleX(0);
  }
}

.announcement-bar__message {
    padding: 0.5rem 0 !important;
    min-height: 0.8rem !important;
}

Thanks!

Hi,

I tried. This also does not work. Any other suggestions maybe? Also all of a sudden my colors in mij editing screen look different than on the actual website. So my menu now is brown but should be white.