Archived topic
Off-Canvas Submenu
5 replies · Started by John on August 17, 2020
Hi...
In the off-canvas menu, I'd like a selected submenu to remain open. Is that doable?
Thanks!
Hi there,
Try this:
https://generatepress.com/forums/topic/off-canvas-secondary-menu/#post-1387406
Adding CSS: https://docs.generatepress.com/article/adding-css/
Let me know if this helps :)
Thanks, Leo.
I had been using this code, which seems to work sufficiently to expand the entire menu structure. What I was hoping for is that only a top-level menu section where a submenu has been selected would be open, and all other top-level sections would remain closed.
.slideout-navigation .inside-navigation {
padding: 0;
}
#generate-slideout-menu .sub-menu > li > a {
padding-left: 30px;
}
#generate-slideout-menu .sub-menu .sub-menu > li > a {
padding-left: 60px;
}
Hi there,
try this CSS:
#generate-slideout-menu.main-navigation ul li.current-menu-parent ul {
display: block !important;
opacity: 1;
visibility: visible;
pointer-events: auto;
height: auto;
overflow: visible;
}
Nice. I added little padding too, to indent the submenus a little.
#generate-slideout-menu.main-navigation ul li.current-menu-parent ul {
display: block !important;
opacity: 1;
visibility: visible;
pointer-events: auto;
height: auto;
overflow: visible;
padding: 30px;
}
Thanks, David.
You're welcome