Archived topic
Keep dropdown submenu items visible
61 replies · Started by Ingrid on December 27, 2016
Can you try this:
.sidebar .secondary-navigation .main-nav .current-menu-item > .sub-menu,
.sidebar .secondary-navigation .main-nav .current-menu-ancestor > .sub-menu {
opacity: 1 !important;
display: block !important;
left: auto;
right: auto !important;
position: relative;
width: 100%;
clear: both !important;
top: auto;
float: none;
}
.sidebar .current-menu-item .dropdown-menu-toggle,
.sidebar .current-menu-ancestor .dropdown-menu-toggle {
display: none;
}
Perfect!!
Thank you!!
No problem!
Hi Tom,
I updated the sites with this CSS on it to the new GP version and it broke al my menu's (I am using child-themes). Subitems aren't visible or clickable anymore :-(. When I remove the extra CSS everything works like it should. Could you provide is with an adjustment in the extra CSS above so that it works with the new version of GP?
Thanks!
Hi there,
Can you link us to the site again with the code added so we can see what the problem is?
Thanks!
We used the code on over 100 (small) websites. And the menu broke on all of them :-(.
Here is one URL where the problem still exists;
https://1.segment.nl/bmwe/
One test-website where I removed the extra CSS;
https://1.segment.nl/testmenu/
This is the code we are using;
.sidebar .main-navigation .main-nav .current-menu-item .sub-menu,
.sidebar .main-navigation .main-nav .current-menu-ancestor .sub-menu {
opacity: 1 !important;
display: block !important;
left: auto;
right: auto !important;
position: relative;
width: 100%;
clear: both !important;
top: auto;
float: none;
}
.sidebar .current-menu-item .dropdown-menu-toggle,
.sidebar .current-menu-ancestor .dropdown-menu-toggle {
display: none;
}
Thanks for your help!
Hi, me too
I updated to the new GP version and it broke secondary menu.
I use the same CSS than Ingrid but, if I remove it, the menu still does not work.
You can see it here: http://bit.ly/2yrHR5e
I just adjusted the CSS on the front page to work with 2.0: https://generatepress.com/forums/topic/keep-dropdown-submenu-items-visible/#post-258688
Sorry for the inconvenience!
Let me know :)
YES!! Problem solved! Thanks Tom! Huge fan of GP and your service!
Glad I could help! :)
Thanks Tom but mine doesn't work yet. I think my problem is not CSS because if I delete it, the problem of spaces continue. And with your new CSS do nothing.
Can you remove the custom CSS completely so I can see why it doesn't work?
ok, I removed all custom CSS.
Ah yes, that looks like a bug in 2.0 and the Secondary Navigation.
For now, add this CSS:
.dropdown-click .widget-area .secondary-navigation ul ul:not(.toggled-on) {
position: absolute;
left: -99999px;
}
Work perfect! Thanks Tom!