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?
October 19, 2015 at 9:54 am
#145670
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 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-development