Almost ready to go live with a new website. But one thing I can’t get fixed. I have styled the mainmenu with the hover an active menu’s look like buttons. Now I want the latest menu item (afspraak maken) have a different color also when hover over it. I managed that, but when the menu is active it changes to the active color of the mainmenu. I don’t want that, I want the latest menu has the same style when hover over it.
Just want to say thank you Pieter for asking the question and thank you Tom for the answer.
I wanted to have the active state of secondary navigation a different colour for each page it links to, so that it matches the branding of that page, I managed it by adapting the css you provided – each item has it’s own class and i applied this CSS. I do get a slight flicker of the active colour on click but otherwise it works perfectly.. You guys have just made me look clever π
/* Change active menu item for each page by using a css class */
.hataxbox a:active,
li[class*=”current-menu-“].hataxbox > a {background-color: #96c93e!important;
}
.habudgetbox a:active,
li[class*=”current-menu-“].habudgetbox > a {background-color: #911421!important;
}
.hataxingtime a:active,
li[class*=”current-menu-“].hataxingtime > a {background-color: #0a5583!important;
}