Background and text color of main menu drop-down

  • Author
    Posts
  • #133390

    gabrielmaset
    Member
    Original poster

    Hi, I’ve seen CSS codes to change the color of the main menu but I’m having a hard time finding the code to change the color of the drop-down background after you hover the mouse on the top main menu. I need to change the background color, background hover color and text color of the drop down under the main menu. Would appreciate any help.

    Thanks!

    The blog I need help with is: bbccusa.com

    #133420

    anhtnt
    Theme Author

    Hi,

    Please use this CSS for the dropdown menu:

    .main-menu li li {
        background: #f00; // background for sub-menu
    }
    .main-menu li li:hover {
        background: #f00; // background on hover
    }
    .main-menu li li a {
        color: #0f0; // text color
    }
    .main-menu li li:hover > a {
        color: #00f; // text color on hover
    }

    Cheers

    #133459

    gabrielmaset
    Member
    Original poster

    .main-menu li li {
    background: rgba(0,0,0,0.7);
    }
    .main-menu li li:hover {
    background: rgba(179,0,179,0.7);
    }
    .main-menu li li a {
    color: #f7f7f7;
    }
    .main-menu li li:hover > a {
    color: #000;
    }

    Thank you! But something is not right… when I hover the dropdown, the background changes to the correct color for a second but then it changes to white. Commented out all other CSS code and the issue persisted. Any ideas?

    #133461

    gabrielmaset
    Member
    Original poster

    Nevermind. Figured it out.

    .main-menu li li:hover > a {
    background: rgba(179,0,179,0.7);
    }

    Thanks!! :)

The topic ‘Background and text color of main menu drop-down’ is closed to new replies.