Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Design Sub Menu Background color

  • This topic is empty.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #256252
    verenabecker
    Participant

    Hi,

    somebody knows how to do this?

    The sub-menu was black. With the following code I tried to change it to white:
    .sub-menu li a {
    background: #FFFFFF;
    }

    But as you can see on livinlightly.de there are still some black lines/edges. I want them also to be white.
    Could you please help me?
    :)
    thanks!

    #256253
    Paulie_D
    Member

    You just need to remove the default padding from the submenu ul.

    padding:0;
    

    A CSS reset is optimal.

    #256268
    verenabecker
    Participant

    Thank you for your fast answer! :)

    If i do it like that, it doesn´t work, the menu just gets smaller and the padding left/right side changes – but there is still the black space…what am i doing wrong?

    .sub-menu li a {
    background: #FFFFFF;
    padding:0;
    }

    livinlightly.de
    Would be thankful for another answer :)!

    #256270
    Paulie_D
    Member

    Try this

    @media only screen and (min-width: 768px)
    style.css?ver=1.4.5:1600
    .navbar-nav > li > .sub-menu {
        margin-left: -1px;
        border: 1px solid #010101;
        background-color: #010101; /* change this to "white" or just delete it*/
        color: #AFAFAF;
    }
    

    you should get this

    #256271
    verenabecker
    Participant

    Thank you!

    But this is strange. It doesn´t work when I am doing this…although I used the code exactly the way you did it… .

    maybe you know what the problem is?

    .sub-menu li a {
    background: #FFFFFF;
    font-size: 15px;
    }

    @media only screen and (min-width: 768px)
    style.css?ver=1.4.5:1600
    .navbar-nav > li > .sub-menu {
    margin-left: -1px;
    border: 1px solid #010101;
    background-color: #010101; /* change this to “white” or just delete it*/
    color: #AFAFAF!important;
    }

    Thanks a lot for your help.

    #256272
    Paulie_D
    Member

    It has nothing to do with the anchor tags. It’s the background color of the submenu ul showing through the padding.

    If you have changed the background of the .sub-menu class the you may need to clear the CSS cache to see it take effect. it certainly works when I use Developer Tools to change that setting.

    #256276
    verenabecker
    Participant

    Ok thanks.

    Don´t understand why it doesn´t work with the code above…

    #256277
    Paulie_D
    Member

    I would suspect it’s because your set-up (WP right) is versioning your CSS

    style.css?ver=1.4.5:1600

    is a pretty good indication.

    that’s why I suggested making sure your cache is cleared.

    #256278
    verenabecker
    Participant

    Hm that´s what I did… :)
    thanks for your time…

Viewing 9 posts - 1 through 9 (of 9 total)
  • The forum ‘Design’ is closed to new topics and replies.