How to modify the background color for sub-menu of mega main menu (main-niv)?

This topic has 8 replies, 2 voices, and was last updated 5 years, 1 months ago ago by Rose Tyler

  • Avatar: Thomas_Tam
    KThomas
    Participant
    February 28, 2019 at 10:48

    Hi Support,

    I’m not sure how to modify the background color to black on CSS file for sub-menu of mega main menu (main-niv)?

    I tried this below but no luck.
    .main-nav {
    background-color: black;
    }
    .main-nav .menu li a {
    color: white;
    font-size: 16px;
    font-family: Open Sans;
    }
    .main-nav .menu > li .nav-sublist-dropdown ul li {
    background-color: black;
    }
    .main-nav .menu > li .nav-sublist-dropdown .container > ul > li a {
    border-left: 1px solid black;
    border-right: 1px solid black;
    border-top: 1px solid black;
    border-bottom: 1px solid black;
    }

    Thanks and Best Regards,
    Thomas

    7 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    February 28, 2019 at 11:00

    Hello,

    Have you cleared cache?
    Please provide URL of your site.

    Regards

    Avatar: Thomas_Tam
    KThomas
    Participant
    February 28, 2019 at 11:26

    Hi Rose,

    Yes, I did.
    Please try the “Brand” menu.

    Thanks and Best Regards,
    Thomas

    Please contact administrator
    for this information.
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    February 28, 2019 at 11:30

    Hello,

    Please change this code

    .main-nav .menu > li .nav-sublist-dropdown ul li {
        background-color: black;
    }

    to

    .main-nav .menu > li .nav-sublist-dropdown {
        background-color: black !important;
    }

    Regards

    Avatar: Thomas_Tam
    KThomas
    Participant
    February 28, 2019 at 11:37

    Hi Rose,

    It worked. Many thanks.

    Can I ask you one more question? How come under my “Account” it showed up a lot of links? How can I delete it?

    Best Regards,
    Thomas

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    February 28, 2019 at 11:44

    Hello,

    You’re welcome!
    WooCommerce > Settings > Advanced > Account endpoints.
    Also, you can create own menu Appearance > Menus > http://prntscr.com/mr9wn0

    Regards

    Avatar: Thomas_Tam
    KThomas
    Participant
    February 28, 2019 at 11:52

    Hi Rose,

    Well Noted.
    Thanks again for your great help.

    Best Regards,
    Thomas

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    February 28, 2019 at 11:56

    Hello,

    You’re welcome!
    Have a nice day.

    Regards

  • Viewing 8 results - 1 through 8 (of 8 total)

The issue related to '‘How to modify the background color for sub-menu of mega main menu (main-niv)?’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.