Home Forums Basel support forum Highlight Active Menu-item when Sub-Menu is Hover

Highlight Active Menu-item when Sub-Menu is Hover

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #9969

    Com_AEGIS
    Participant

    Dear Support I customised my menu colors and would like to give a white background to my menu item.

    It work when I hover it but it doesn’t work when I’m on the submenu.

    I would like to keep it white even when the submenu is active and not only when hovering the menu item.

    Seems I way use something like .menu-ancestor class, but can’t make it works.

    Check the capture

    Attachments:
    You must be logged in to view attached files.
    #9978

    Artem Temos
    Keymaster

    Hello,

    You can use current-menu-item CSS class that added to li element of the active page.

    Regards

    #10003

    Com_AEGIS
    Participant

    Hi Guys,

    I used that custom css : `.basel-navigation .menu li.current-menu-item > a :active{
    background-color:#bda474!important;
    }`

    It makes my active menu-item background white when I’m hover it but it doesn’t work when I hover the sub-menu (mega menu with html bloc)

    How can I do ? can you provide me the good css ?

    #10006

    Artem Temos
    Keymaster

    Hi,

    Try this one

    .basel-navigation .menu li.current-menu-item > a {
    background-color:#bda474!important;
    }

    Regards

    #10112

    Com_AEGIS
    Participant

    Hi Guys,

    The CSS you provided don’t do what I’m seeking for.

    It highlights only the current active page.

    I would like to color the my main menu-item when I explore the corresponding sub-menu.

    Do you understand what I mean ?

    Thanks

    #10116

    Artem Temos
    Keymaster

    OK, try to use this example

    .basel-navigation .menu li:hover > a {
    background-color:#bda474!important;
    }
    #10240

    Naxelana
    Participant

    Thank you !!!! 🙂

    #10246

    Artem Temos
    Keymaster

    You are welcome!

Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘Highlight Active Menu-item when Sub-Menu is Hover’ is closed to new replies.