Site logo

Archived topic

Open submenus in slideout menu by default

7 replies · Started by Phil on July 6, 2018

Viewing posts 1–8 of 8

Hi!

I'm trying to get the proper CSS to change the default behavior for the submenus in the slideout menu. My client needs the submenus to display by default in the slideout menu, rather than closed by default. Whether the submenus can be clicked close or stay open permanently doesn't matter. I'm assuming I need to modify a class with {display: block;} but I can't seem to get to the right selector.

Can you help?

Thanks!

Hi there,

Would it work if you create a separate menu with all the items as parent menu items and use it for slideout navigation specifically?

Our site is using the same idea.

Let me know :)

Thanks!

That was my first idea, but my client doesn't want that approach. If there's no way to use CSS to achieve the effect, I guess we'll need to use that method, but if there IS a way to keep the parent-child setup with the submenu open by default, that's ideal!

You could try something like:

.slideout-navigation .sub-menu {
    display: block !important;
    height: auto;
    pointer-events: auto;
    opacity: 1;
}

.slideout-navigation .dropdown-menu-toggle {
    display: none;
}

Let me know :)

Thanks!

That produced an interesting effect:

The submenu now both opens on hover and closes off hover, and opens on click and closes on click.

But it's definitely progress!

I just edited the CSS above - can you give it another try?

Yes!!! That worked perfectly. Thank you so much!!

Awesome, glad I could help! :)

This archived topic is closed to new replies.