Reactive header and logo color (transparent header) Craft Theme

Topic summary

Customizing a transparent homepage header in Shopify’s Craft theme, with white text and a defined sticky header background, but encountering logo color, menu text, scope, and layout issues.

Recent updates:

  • A helper requested the preview URL; the merchant provided it. A CSS tip was shared to adjust submenu styling.
  • The merchant successfully set dropdown submenu text to black via CSS (header__submenu .header__menu-item { color: var(–color-base-text) !important;}).

Remaining issues:

  • Logo color on the transparent homepage header should be off-white; current PNG can’t be inverted, and an alternative approach is needed.
  • Transparent header should apply only on the homepage, but it’s affecting other pages despite using {% if template.name == “index” %} in base.css.
  • Header overlap/missing top margin appears when using position: absolute, causing the header to sit over page content.
  • Announcement bar disappears on scroll; desired behavior is to keep it visible above the sticky header.

Notes:

  • Code snippets (Liquid in base.css and CSS selectors) and screenshots are central to understanding the issues.

Outcome/status:

  • Dropdown text color is resolved; other items remain open and awaiting further guidance.
Summarized with AI on February 9. AI used: gpt-5.

Hello community !

I managed to apply a transparent header on the homepage of my website (theme CRAFT), change the text colour when transparent, and change the background color of my sticky header (see images below). But i still having some trouble to the colour of my logo, to applied the transparent header only on my homepage.

Here is the code I applied in base.css :

/* Transparent header */
{% if template.name == “index” %}
.header-wrapper{
background: transparent !important;
position: absolute;
width: 100%;
}
.header__active-menu-item,
.header__icon,
.header__menu-item {
color: #F8F7F3 !important;
}
{% endif %}

/* Sticky Header Color */
.shopify-section-header-sticky .header-wrapper{
background: var(–gradient-background) !important;
}
.shopify-section-header-sticky .header__active-menu-item,
.shopify-section-header-sticky .header__icon,
.shopify-section-header-sticky .header__menu-item {
color: rgba(var(–color-foreground),.75) !important;
}

I’m still looking a solution for:

-Change the color of my logo to off-white like the text on the transparent header, (it’s a PNG logo and it’s not black so the invert option doesn’t work for me)

-Change the color of the text of the drop-down menu in the transparent header, because currently it’s white on white

-On my other pages of the website, my transparent header also applies, even if I put an “{% if template.name == “index” %}” in my code so that it would only be applied to the home page.

Moreover, as you can see on the image, the transparent header is superposed on the top page, as if there was no more margin provided for the menu…

-Finally I noticed that when I scroll down, my announcement bar disappears, I have no idea if this is normal, or if my code changed this, but I wish 'it remains displayed above the sticky header..

That’s it, i know it’s a lot but if someone in the community have the solution i would be very very thankful
atelierpampam_4-1662459473002.png

thank you very much in advance
atelierpampam_5-1662459473004.png

Cécile.

@atelierpampam

My pleasure to help you.
Welcome to the Shopify community!
Please share your store URL!
I will check out the issue and provide the correct solution to you!

Thanks!

Hello thank you for your message !

My website isn’t published yet but i have a preview link : https://8h3vlp7cc1ps8632-55015473216.shopifypreview.com is this ok for you or i can share you the password !

@atelierpampam

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

.atelierpampam-gdpr .header__submenu {
    background: transparent !important;
    border: 1px solid #fff !important;
}

Thanks!

Thank you for your answer, perhaps i was not very precise, i was searching to put the submenu text in black instead of white, but not have de background transparent, with your suggestion i tried this and it works ! :

.header__submenu .header__menu-item {
color: var(–color-base-text) !important;

But i still have the other problems to solve :sweat_smile: do have any ideas to for the other points ?

Thank you so much,

Cécile.

Hello,

Did you see my last reply ? Do you have any idea to fix the other points i mentionned ? Thanks a lot for the help,

Cécile.