- This topic is empty.
-
AuthorPosts
-
June 29, 2017 at 8:56 am #256252
verenabecker
ParticipantHi,
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!June 29, 2017 at 9:00 am #256253Paulie_D
MemberYou just need to remove the default padding from the submenu
ul
.padding:0;
A CSS reset is optimal.
June 30, 2017 at 1:45 am #256268verenabecker
ParticipantThank 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 :)!June 30, 2017 at 3:18 am #256270Paulie_D
MemberTry 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
June 30, 2017 at 3:24 am #256271verenabecker
ParticipantThank 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.
June 30, 2017 at 4:23 am #256272Paulie_D
MemberIt 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.June 30, 2017 at 6:38 am #256276verenabecker
ParticipantOk thanks.
Don´t understand why it doesn´t work with the code above…
June 30, 2017 at 6:55 am #256277Paulie_D
MemberI 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.
June 30, 2017 at 6:58 am #256278verenabecker
ParticipantHm that´s what I did… :)
thanks for your time… -
AuthorPosts
- The forum ‘Design’ is closed to new topics and replies.