Archived topic
Mega Menu, child items, current color & background color
3 replies · Started by albabes on October 9, 2019
Hi Guys
Using your mega menu css here. https://docs.generatepress.com/article/building-simple-mega-menu/
But in the customizer, color, the sub-menu items, the current colors don't seem to work?
Can you provide some CSS please for sub-menu, current items please?
Thanks much.
AL Guevara
Hi there,
this part of the CSS:
nav .main-nav .mega-menu>ul>li:hover>a,
nav .main-nav .mega-menu>ul>li:focus>a,
nav .main-nav .mega-menu>ul>li[class*="current-"]>a,
nav .main-nav .mega-menu ul ul {
background-color: transparent !important;
color: inherit;
}
Change it to:
nav .main-nav .mega-menu>ul>li:hover>a,
nav .main-nav .mega-menu>ul>li:focus>a,
nav .main-nav .mega-menu ul ul {
background-color: transparent !important;
color: inherit;
}
Then it will respect the default nav colors. If you want to style them with your own CSS then use this CSS selector:
nav .main-nav .mega-menu>ul>li[class*="current-"]>a
Thank you DAVID!!!
You're welcome