Archived topic
Update current item background color for only one specific menu item
3 replies · Started by Laine on July 22, 2020
I applied custom styling to one of my navigation items (so it's like a button) but I can't seem to update the background color for when it's the current page.
I have this code:
.main-navigation .main-nav ul li[class*="current-menu-"] > a {
background-color: #B16049;
}
and I tried this, but it didn't work:
#menu-item-1035 .main-navigation .main-nav ul li[class*="current-menu-"] > a {
background-color: #B16049;
}
Any ideas what I need to add to target just that menu item?
Hi there,
Your site is locked with a password so I can't see.
Would something like this help?
https://docs.generatepress.com/article/adding-buttons-navigation/
That fixed it, thanks!
No problem :)