Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Set active color in a menu Reply To: Set active color in a menu

#248307
Atelierbram
Participant

@flavoni Glad to be of help. Do you use (Chrome) Devtools to “inspect element” in the browser? Then you can see that dynamic markup for yourself … Anyway, here you can use the current-post-parent class set on the list item, like:

#site-navigation .current-post-parent a {
  background-color: #fff;
  color: blue;
}

Can also combine those rules like:

#site-navigation .current-menu-item a,
#site-navigation .current-post-parent a {
  background-color: #fff;
  color: blue;
}