Site logo

Archived topic

Possible to have a submenu expanded by default?

3 replies · Started by apmichaelson on February 27, 2021

Viewing posts 1–4 of 4

Hello everyone, thank you for your great product!
I use GeneratePress with Sider to have my navigation on the left side. I've got a submenu to show navigation, and I'd love to have the submenu expanded by default, so that my site visitors don't have to click in order to see what the options are. Is this possible, or maybe some other/better way to achieve this visibility? Thank you so much!

Hi there,

Give this CSS a shot:

.main-navigation .dropdown-click .main-navigation ul ul {
    display: block;
    left: auto;
    right: auto;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    height: auto;
    overflow: visible;
    text-align: center;
}

I added text-align: center; above to center the submenu, feel free to remove that line if not needed.

Adding CSS: https://docs.generatepress.com/article/adding-css/

You should be able to style the rest in the customizer.

Let me know if this helps :)

Leo, thank you so much! That's perfect, much appreciated!

No problem :)

This archived topic is closed to new replies.