Tagged: x
-
AuthorPosts
-
June 10, 2016 at 4:19 am #1035589
HorizonParticipantHi
On my site i have a menu with a sub menu. When a page is active i.e when you’re on the Home page the Home title in the nav bar has a background color.
However when i’m on a sub menu page i’d like the parent page to have a background color so the user can see where they’re at.
At the moment i use this code:
`.x-navbar .desktop .x-nav > li.menu-item-has-children > a {
color: white;
background-color: #1a0000;
}’But the background color stays there, i only need it to display when the sub menu pages are active.
How can i achieve this?
Thanks 🙂
June 10, 2016 at 4:20 am #1035590
HorizonParticipantThis reply has been marked as private.June 10, 2016 at 9:29 am #1035918
Paul RModeratorHi,
You can add this under Custom > Edit Global CSS in the Customizer.
.x-navbar .desktop .x-nav > li.current-menu-parent a { color: white; background-color: #1a0000; }Hope that helps.
June 10, 2016 at 10:56 am #1036038
HorizonParticipantThanks almost perfect,
Only problem now is the sub menu has a black background with a grey margin, how can i make the sub menu background completely black or completely grey?
Thanks again
June 10, 2016 at 2:33 pm #1036315
JoaoModeratorHi There,
It seems like you already found a solution.
I just can see de dividers lines.
In case you want to get rid of them. please add the following code to Appereance Customizer Custom CSS
.desktop .sub-menu li:after, .desktop .sub-menu li:before { display: none !important; border: 0px; }Hope that helps,
Joao
June 12, 2016 at 4:48 pm #1038601
HorizonParticipantThis reply has been marked as private.June 13, 2016 at 12:32 am #1039044
RupokMemberHi there,
Thanks for updating. If you want to make the entire submenu black then use this :
.x-navbar .sub-menu { background: #1a0000!important; }To make the submenu grey, use this instead:
.x-navbar .sub-menu li a { background: #474747!important; } .x-navbar .desktop .sub-menu li::before, .x-navbar .desktop .sub-menu li::after { background-color: #474747; }Hope this helps.
Cheers!
June 28, 2016 at 12:34 pm #1063609
HorizonParticipantThanks for your reply, i went with the first code:
.x-navbar .sub-menu { background: #1a0000!important; }However the sub menu text is also black; except when on a page within the “Garage Doors” menu, how can i keep the sub menu text white?
Thanks
June 28, 2016 at 1:16 pm #1063689
JoaoModeratorHi There,
Please add the following code to Appereance Customizer Custom CSS
.x-navbar .sub-menu li a { color: white!important; }Hope it helps
Joao
June 29, 2016 at 8:10 am #1064803
HorizonParticipantPerfect thanks, One last thing, when hovering over the menu items is it possible for the background of each item to change to black (The same way the active page menu item has a background color)
June 29, 2016 at 8:50 am #1064881
JoaoModeratorHi There,
Please Update the code above to:
.x-navbar .sub-menu li a { color: white!important; padding-left: 20px; } .x-navbar li a:hover { background: black!important; } .x-navbar.x-navbar-fixed-left .desktop .sub-menu { padding: 0; }Hope it helps
Joao
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1035589 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
