Site logo

Archived topic

Off canvas flyout sub items

5 replies · Started by Maro on November 22, 2022

Viewing posts 1–6 of 6

Hi
Have you by any chance a snippet or CSS to get the sub items in an off canvas menu to flyout horizontally instead of the default dropdown?

Thanks

Hi Mario,

Are you referring to Sliding in and out of the Off-Canvas menu? If so, there's a Style option in Appearance > Customize > Layout > Off Canvas Menu. You can try setting that to Slide. Reference: https://docs.generatepress.com/article/off-canvas-panel-overview/

If you're referring to something else, can you share a reference site that has your preferred Off-canvas menu so we can have an idea of what you're going for?

Hi, thanks for the quick reply.
Not the sliding in and out, its more of a second level slidout.
So if a menu item have sub menu items it would slide out instead of dropdown.
You can look at this nav solution https://www.ssab.com/sv-se

Thanks

Hi, thank you for the reply.

Basically that would be a great solution, but why I would like to have it in the off canvas is for the sliding effect.
And the example that I showed you wasn't that good, here is a better one https://www.polestar.com/se/

Thanks

It's kinda tricky, you can give this CSS a try, but I don't think it's gonna work perfectly:

#generate-slideout-menu.main-navigation .main-nav ul ul {
    position: absolute;
    left: 0;
    height: 100vh;
    display: block !important;
    opacity: 0;
    transition:all 0.5s ease;
}

nav#generate-slideout-menu {
    overflow: visible;
}

#generate-slideout-menu.main-navigation .main-nav ul li:hover ul {
    visibility: visible;
    left: 265px;
    opacity:1;
}
This archived topic is closed to new replies.