• Hi,

    I would like to change the background colour of the drop down menu in the main heading from white to lack using custom css. Is there a code or any other mehod i can use to achieve this.

    If it helps, I have figured out how to change the header colour from white to black and also the text from black to white, using the following code sequence(s)

    }
    .site-header .main-header-bar {
    background: rgba(0,0,0, 180);
    }

    .main-header-menu a {
    color: #000000;
    }

    .main-header-menu a:hover {
    color: #ffffff !important;
    }

    Yet in my investigation am struggling to change the background when the menu drops down.

    can what I am trying to do be done? Can somebody please help. Thank you in advance

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Try:

    .main-header-menu .sub-menu{
        background: #000;
    }
    • This reply was modified 4 years, 4 months ago by wpfundi.
    Thread Starter craigm1

    (@craigm1)

    Fantastic!!! Yes, this worked exactly how I had hoped. thank you very much indeed

    • This reply was modified 4 years, 4 months ago by craigm1. Reason: issue with optimising on other devises
    Thread Starter craigm1

    (@craigm1)

    Although i used this code and it has worked,, it has not translated the change to mobile or tablet, Why is this, as was my belief this would be automatic?

    • This reply was modified 4 years, 4 months ago by craigm1.
    Moderator bcworkz

    (@bcworkz)

    Many themes use a separate menu scheme for mobiles. Thus separate CSS. Try this:

    .ast-header-break-point .ast-header-custom-item, .ast-header-break-point .main-header-menu {
        background-color: #000;
    }

    Consider learning to use your browser’s element inspector tool to help you identify applicable CSS. You can test new values with it, then copy any successful results to the Additional CSS section of the customizer. While we’re happy to help you here, you get quicker results when you can help yourself ?? I know you’ve tried to do so, but I’m unsure what methods you used. I know I struggled with WP CSS until I learned about this tool.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘changing background colour of the dropdown menu’ is closed to new replies.