[Resolved] Menu/submenu question

Home Forums Support [Resolved] Menu/submenu question

Home Forums Support Menu/submenu question

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #708702
    Kle

    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.

    #708705
    Kle

    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.

    #708876
    David
    Staff
    Customer Support

    Hi there,

    you can try this selector for the current menu item:

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

    #709490
    Kle

    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;
    }
    
    #710049
    David
    Staff
    Customer Support

    Hi there,

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

    #710455
    Kle

    That did it, Thank you David!

    #710562
    David
    Staff
    Customer Support

    You’re welcome.

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.