Hi Guys,
I would like to ask if you could provide me with a code for the following:
- When my header is transparent, the text color should be white.
- 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
-
Go to Online Store → Theme → Edit code.
-
Open your theme.liquid file
-
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
@katbuddies
- Go to Online Store → Theme → Edit code.
- Open your theme.liquid file
- 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