Reply To: Change color of ONE of the items in the menu?

Home Forums Support Change color of ONE of the items in the menu? Reply To: Change color of ONE of the items in the menu?

Home Forums Support Change color of ONE of the items in the menu? Reply To: Change color of ONE of the items in the menu?

#145670
Tom
Lead Developer
Lead Developer

First you would add a custom CSS class to your menu item in “Appearance > Menus” (I assume you already did this?).

Then you could do something like this:

.main-navigation .main-nav ul li.my-custom-class a {
    /* CSS for regular state */
}

.main-navigation .main-nav ul .my-custom-class.current-menu-item > a, 
.main-navigation .main-nav ul .my-custom-class.current-menu-parent > a, 
.main-navigation .main-nav ul .my-custom-class.current-menu-ancestor > a {
    /* CSS for current state */
}

.main-navigation .main-nav ul li.my-custom-class > a:hover, 
.main-navigation .main-nav ul li.my-custom-class.sfHover > a {
    /* CSS for hover state */
}

Hope this helps 🙂