Hi there,
How can I have different text color for main menu item and submenu item? Right now, I have white color for both parent and child menu items. I want to have black for submenu items.
Here’s the store link:
A Shopify store owner wants to differentiate menu styling by having white text for main navigation items and black text for submenu items, but currently both display in white.
Current Issue:
Proposed Solutions:
.site-nav__link for main items and .site-nav__dropdown .site-nav__link for submenus with different color valuesStatus:
Hi there,
How can I have different text color for main menu item and submenu item? Right now, I have white color for both parent and child menu items. I want to have black for submenu items.
Here’s the store link:
Hi @OneClothing ,
Please add the following code in to CSS:-
site-nav__link
{
color: white !important;
background-color: white !important;
}
.site-nav__dropdown .site-nav__link
{
color: black !important;
background-color: white !important;
}
Access Your Theme’s Code:
Locate Your CSS File:
Add Custom CSS:
Please apply this code and do let me know if it resolves the issue else I could give more suggestions based on some more information.
Thanks!
Hi @OneClothing
Your submenu background is black, so if you use black color for the submenus, they will be invisible.
I only want to change on desktop.
Sorry mate! This does not work.
I am currently using this css code to only make the white color of icons and main menu items but this also effects on submenu/child items as well.
.header__list>li>, .header__buttons>li> {
color: rgb(251 251 244) !important;
}