Hi, I need help writing a code that changes the text color in the Dropdown Menu. I want to change the color of only the subcategory text in the menu, while keeping the category headers green as they are. I’ve tried watching some videos on YouTube, but none of the codes worked — the colors always stayed the same.
Hello @KBOTRBNT,
You can target only the subcategory links by using a more specific CSS selector. For example:
header__submenu .header__menu-item a {
color: #ffffff; /* your desired color */
}
.header__menu-item–top-level > a {
color: #00ff00; /* keep category headers green */
}
If it still doesn’t change, add !important to override theme styles:
.header__submenu .header__menu-item a {
color: #ffffff !i
mportant;
}
Add this in Online Store > Themes > Customize > Theme Settings > Custom CSS or in your base.css.
Many greetings rafael From Muthwerk
Hi @KBOTRBNT
Ok dear, please share your store URL and collaborator code with me so I can check and provide you with the proper solution.
Thanks for your help! I tried everything you said, but nothing worked. I think maybe some other CSS or the theme’s code is blocking the color change.
Hi! I sent you the store URL and collaborator code to your email earlier. Thanks a lot for your help!
