Transparent header 2 colors

Topic summary

A Shopify store owner using the Refresh theme needs help implementing a dual-color header system:

Core Requirements:

  • Transparent header with white text on homepage
  • White header with black text when scrolling
  • Logo must remain unchanged (single color)
  • Mobile menu sidebar should display black text on white background

Current Status:
The user found working code that handles the transparent-to-white header transition correctly, but encounters two specific issues:

  1. Desktop: A dropdown container labeled “Hilfe” shows white text on white background when header becomes solid, making it invisible
  2. Mobile: When the side menu opens (white background), text remains white and becomes unreadable

Progress:
Multiple CSS solutions were attempted by community members (@niraj_patel, @topnewyork), but none fully resolved both issues. The user’s current code successfully handles the main header color transitions but needs refinement for the dropdown menu styling and mobile menu text visibility.

Remaining Challenge:
Finding CSS targeting that specifically addresses the “Hilfe” dropdown container and mobile menu text color without breaking the existing transparent header functionality.

Summarized with AI on November 1. AI used: claude-sonnet-4-5-20250929.

Hi Guys,

I would like to ask if you could provide me with a code for the following:

  1. When my header is transparent, the text color should be white.
  2. When the header becomes white, the text should change to the default color (as seen in the second image).

On mobile, when the menu slider opens from the side (which has a white background), the text should remain black inside the menu

And i don’t want my logo to change colors also, logo should stay in one color

Thank you in advance for your help!

1 Like

hello @katbuddies , I see you are using RERESH theme of shopify.

You can add below code by following these steps to color changes of menu items as you requested

  1. Go to Online Store → Theme → Edit code.

  2. Open your theme.liquid file

  3. Paste the below code before on theme.liquid

@media screen and (min-width: 750px) { .section-header .header-wrapper .list-menu span, .section-header .header-wrapper summary svg, .section-header .header-wrapper .disclosure__button>span, .section-header .header-wrapper .disclosure__button svg, .section-header .header-wrapper a svg{ color:#fff !important; } .section-header.shopify-section-header-sticky .header-wrapper .list-menu span, .section-header.shopify-section-header-sticky .header-wrapper summary svg, .section-header.shopify-section-header-sticky .header-wrapper .disclosure__button>span, .section-header.shopify-section-header-sticky .header-wrapper .disclosure__button svg, .section-header.shopify-section-header-sticky .header-wrapper a svg{ color:#000 !important; } }

@katbuddies
Hi , kindly provide your store URL please and if it is password protected, please share the password as well. Thanks

it worked, but this text is now invisible only on white header on transparent is good

https://katbuddies.shop/

@katbuddies

  1. Go to Online Store → Theme → Edit code.
  2. Open your theme.liquid file
  3. In theme.liquid, paste the below code before

If my reply is helpful, kindly click like and mark it as an accepted solution.
Thanks!

No it didn’t work, this code here does work but only problem is this this “Hilfe” container on white header text stays white

@media screen and (min-width: 750px) { .section-header .header-wrapper .list-menu span, .section-header .header-wrapper summary svg, .section-header .header-wrapper .disclosure__button>span, .section-header .header-wrapper .disclosure__button svg, .section-header .header-wrapper a svg{ color:#fff !important; } .section-header.shopify-section-header-sticky .header-wrapper .list-menu span, .section-header.shopify-section-header-sticky .header-wrapper summary svg, .section-header.shopify-section-header-sticky .header-wrapper .disclosure__button>span, .section-header.shopify-section-header-sticky .header-wrapper .disclosure__button svg, .section-header.shopify-section-header-sticky .header-wrapper a svg{ color:#000 !important; } }

1 Like

Remove this code, this is irrelevent code…

If that is not working, try this code…

Result:


Thank you!

That code removed my transparent header its only white right now, i want it transparent but only text white

sticky-header.header-wrapper.color-scheme-2.gradient { background: white !important; }

@katbuddies let me check again

No this code didn’t resolve my problem because it changed whole header white, i want it transparent with white text and on scrolling when header is white it should be black text

@katbuddies An extremly sorry for this, again i updated the code… try this one


Still not working could you please check my old code this does work like i need it, but only problem with this one is on mobile version when i pull out menu text is white and and background also white so you don’t see text. If you could make my mobile menu black background and also this container on “Hilfe” black background

Mobile version : https://streamable.com/6apgx4

Code:
{% if template == ‘index’ %}

.section-header .header-wrapper .header__icons *, .section-header .header-wrapper summary.list-menu__item, .section-header .header-wrapper summary svg, .section-header .header-wrapper .list-menu__item span { color: #fff !important; } body .section-header.scrolled-past-header .header-wrapper .header__icons *, body .section-header.scrolled-past-header .header-wrapper summary.list-menu__item, body .section-header.scrolled-past-header .header-wrapper summary svg, body .section-header.scrolled-past-header .header-wrapper .list-menu__item span { color: inherit !important; }

{% endif %}

This container is only problem:

And transparent header with white text like this is perfect