I'm programming a simple wordpress page and want to change the background color of the menu bar (on the top right) when hovering over it. It's on this website: https://www.happylogo.be/.
I normally just do this with 'add additional css' which just is a css file.
The weird thing is that I beleive my selector code is right because when I add 'visibility:hidden;' It rapidly disappears and reappears again when hovering over the li items.
The css code I use now:
#menu-primary-coach li:hover{
/*#menu-primary-coach is the id of the lu*/
background-color: #c7143a !important;
}
But it doesn't work.
How can I change the background color when hovering over the menu items?
jordanmannfeld :
I noticed the <a>tag inside of your <li> is actually overriding the hover state with black. \n\n#primary-nav ul li:hover > a, #sticky_menu li:hover > a {\n background-color: #000000;\n}\n\n\nYou can remove this style or also set the hover state of the <a> to your desired color.",
2019-01-23T21:53:08