Site logo

Archived topic

Menu/submenu question

6 replies · Started by Kle on October 23, 2018

Viewing posts 1–7 of 7

Hi there, hi have a css menu/sub question.

How can I chance the color of a main menu submenu item(s) background hover, and selected, to a different color than what specified for the whole main menu? I would like to have one of my menus items to have a different submenu items gamma.

Thank you.

I got the submenu hover working with this code:

#menu-item-379 .sub-menu a:hover {
	background-color: #f4f4f4;
	color: #141414;
}

I just now need to know how to get the "current/active" sumbenu item to have its own background color when active.

Thank you.

Hi there,

you can try this selector for the current menu item:

.main-navigation .main-nav ul ul li[class*="current-menu-"] > a

Hi David,

It's not working for me. How would I implement it exactly if I only want it for one menu item submenu?

Tried a few things but couldn't get it to work. Tried this for example:

#menu-item-334 .main-navigation .main-nav ul ul li[class*="current-menu-"] > a {
	background-color: #f4f4f4;
	color: #141414;
}

Hi there,

try thus selector: #menu-item-379 .sub-menu li.current-menu-item

That did it, Thank you David!

You're welcome.

This archived topic is closed to new replies.