Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #724108

    chchew
    Participant

    How to add a background color to the top navigation sub menu when involved with a drop down click?

    #724111

    Thai
    Moderator

    Hi There,

    Thanks for writing in!

    Try adding following CSS under Customize > Custom > CSS:

    .x-navbar .desktop .sub-menu a:hover, 
    .x-navbar .desktop .sub-menu .x-active > a, 
    .x-navbar .desktop .sub-menu .current-menu-item > a {
        background-color: #f0f0f0;
    }

    Hope it helps.

    #730382

    chchew
    Participant

    There’s a minor issue. After clicking the main navigation menu, (membership dashboard), the drop down sub-menu automatically highlighted the first item and when I move my mouse to the second item in the sub-menu, it show two items are highlighted in orange. I have attached the screenshot to describe this.

    #730384

    chchew
    Participant
    This reply has been marked as private.
    #730385

    chchew
    Participant

    The sub-menu “Courses” should not be highlighted before a mouse move towards it.

    #730402

    Zeshan
    Member

    Hi there,

    That link is selected because it is the current page item (see: http://prntscr.com/9luyxu). You may want to include “Courses” link as a “Custom Link” instead of pages (see: http://prntscr.com/9luzv8).

    Thank you!

    #730427

    chchew
    Participant

    I have configured a custom link “Courses” and replaced it. However the symptom persists.

    Also, if you click Home, there are two sub items under “Home” navigation menu. They are configured as “Pages”. However it does not have the issue of highlighted “orange”.

    #730452

    Zeshan
    Member

    Hi there,

    This is because the URL you’ve added for that custom link is same as your page URL (see: http://prntscr.com/9lv6t4) and that’s why it’s selected because of same URL. This is the default WordPress behaviour. If you want that link not to be selected, you will need to use a different URL or perhaps # instead (see: http://prntscr.com/9lv7de).

    Thank you!