We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Re: How to change color text header (icon cart & drawer) when you have a transparant header

Solved

How to change color text header (icon cart & drawer) when you have a transparant header

dieuxstudios
Excursionist
25 0 13

Hey there,

I am currently working on a duplicated theme. I have a transparant header, but when I scroll the icon cart & drawer have a bit of a grey color. I want to change that color to #000000 (so completely black) can someone please help me? It’s a little adjustment. (Ps, changing color scheme doesn’t help)

IMG_3946.jpeg

Accepted Solution (1)

websensepro
Shopify Partner
2144 268 319

This is an accepted solution.

Hi @dieuxstudios ,
1. Go to Online Store -> Theme -> Edit code.
2. Open your theme.liquid file
3. In theme.liquid, paste the below code before </head>

<style>
@media(min-width:768px){
.shopify-section.shopify-section-group-header-group.section-header.shopify-section-header-sticky.scrolled-past-header .header__icon.link {
    color: #000 !important;
}
}
@media(max-width:767px){
.shopify-section.shopify-section-group-header-group.section-header.shopify-section-header-sticky.scrolled-past-header .header__icon.link {
    color: #000 !important;
}
}
</style>

websensepro_0-1749118657645.png

 

 

 If my reply is helpful, kindly click like and mark it as an accepted solution.
Thanks!
Use our Big Bulk Discount app to boost your sales! 🚀 (https://apps.shopify.com/big-bulk-discount). Easy to set up and perfect for attracting more customers with bulk discounts. Try it now and watch your revenue grow!

Need a Shopify developer? Hire us at WebSensePro For Shopify Design Changes/Coding
For Free Tutorials Subscribe to our youtube
Get More Sales Using Big Bulk Discount APP
Create Your Shopify Store For Just 1$/Month
Get More Sales Using Big Bulk Discount APP

View solution in original post

Replies 12 (12)

Moeed
Shopify Partner
7764 2082 2568

Hey @dieuxstudios 

 

 

Can you share the preview URL of the draft theme?

 

Best,

Moeed

- Need a Shopify Specialist? Chat on WhatsApp

- Get a quick Shopify quote – Click here!

- Custom Design | Advanced Coding | Store Modifications


Moeed
Shopify Partner
7764 2082 2568

Hey @dieuxstudios 

 

Follow these Steps:

1) Go to Online Store
2) Edit Code
3) Find password.liquid file

4) Add the following code in the bottom of the file above </body> tag

<style>
.scrolled-past-header * {
    color: black !important;
}
</style>

RESULT

Moeed_0-1749115411789.png

 

If I managed to solve your problem then, don't forget to Like it and Mark it as Solution!

 

Best Regards,
Moeed

- Need a Shopify Specialist? Chat on WhatsApp

- Get a quick Shopify quote – Click here!

- Custom Design | Advanced Coding | Store Modifications


dieuxstudios
Excursionist
25 0 13

Hey Moeed, thanks for your quick help. Unfortunetly, it didnt work. Do you maybe have a other suggestion Kind regards

Moeed
Shopify Partner
7764 2082 2568

The code is completely and it does works as well, can you double check if you added the code correctly? Maybe provide me a screenshot so that I can have a look too.

 

Best,

Moeed

- Need a Shopify Specialist? Chat on WhatsApp

- Get a quick Shopify quote – Click here!

- Custom Design | Advanced Coding | Store Modifications


dieuxstudios
Excursionist
25 0 13

Hey Moeed, here is the screenshot:

IMG_3947.jpeg

steve_michael2
Navigator
454 39 62

Hello @dieuxstudios ,

Navigate to Online Store > Themes > click on Edit code.
Locate and open the theme.css or base.css file. Scroll to the bottom and add the following CSS code:

.header__icon--menu .icon {
 color: black !important; 
}
.header__icon, .header__icon--cart .icon {
  
    color: black !important;
}


Result:

Screenshot 2025-06-05 142241.jpg

dieuxstudios
Excursionist
25 0 13

Hey, this unfortunetly also didnt work. When i added it to the custom css, it did work, but then the white text on the transparant header turned into black. is there maybe something else

steve_michael2
Navigator
454 39 62

Please try this code:

.scrolled-past-header sticky-header .header__icon--menu .icon {
 color: black !important; 
}

.scrolled-past-header sticky-header .header__icon, .header__icon--cart .icon {
  
    color: black !important;
}

 

dieuxstudios
Excursionist
25 0 13

Still didnt work unfortunetly

websensepro
Shopify Partner
2144 268 319

This is an accepted solution.

Hi @dieuxstudios ,
1. Go to Online Store -> Theme -> Edit code.
2. Open your theme.liquid file
3. In theme.liquid, paste the below code before </head>

<style>
@media(min-width:768px){
.shopify-section.shopify-section-group-header-group.section-header.shopify-section-header-sticky.scrolled-past-header .header__icon.link {
    color: #000 !important;
}
}
@media(max-width:767px){
.shopify-section.shopify-section-group-header-group.section-header.shopify-section-header-sticky.scrolled-past-header .header__icon.link {
    color: #000 !important;
}
}
</style>

websensepro_0-1749118657645.png

 

 

 If my reply is helpful, kindly click like and mark it as an accepted solution.
Thanks!
Use our Big Bulk Discount app to boost your sales! 🚀 (https://apps.shopify.com/big-bulk-discount). Easy to set up and perfect for attracting more customers with bulk discounts. Try it now and watch your revenue grow!

Need a Shopify developer? Hire us at WebSensePro For Shopify Design Changes/Coding
For Free Tutorials Subscribe to our youtube
Get More Sales Using Big Bulk Discount APP
Create Your Shopify Store For Just 1$/Month
Get More Sales Using Big Bulk Discount APP
dieuxstudios
Excursionist
25 0 13

This worked!!! Thank you so much!!!