[Resolved] Mega Menu Width

Home Forums Support [Resolved] Mega Menu Width

Home Forums Support Mega Menu Width

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1295039
    Ash

    Hi,

    Just purhcased GP and getting stuck straight in!

    I created a simple mega menu as of the documentation, I have 2 dropdowns with 5 columns so full width is fine, but first dropdown only has 2 columns so full width is a bit overkill, it there a way to auto width depending on the amount of columns or a class to set for each column?

    Thanks.

    #1295047
    David
    Staff
    Customer Support

    Hi there,

    try adding this CSS:

    @media (min-width: 769px) {
        nav .main-nav .mega-menu.mega-menu-col-2 >ul {
            max-width: 50%;
        }
    }
    #1295049
    Ash

    Great, thank you!

    #1295061
    David
    Staff
    Customer Support

    You’re welcome

    #1475950
    Ash

    Updated to GP3.0 now this doesnt work? The 2 column width is there but menu items are all in one column now, it uses two-column-menu class.

    #1476185
    David
    Staff
    Customer Support

    I am not seeing two sub-menu lists in the first column ? Is that still set in your Menu settings ?

    #1476198
    Ash

    It’s always been one list screenshot

    With two-column-menu class

    and

    @media (min-width: 769px) {
        nav .main-nav .mega-menu.mega-menu-col-2 >ul {
            max-width: 50%;
        }
    }
    #1476440
    David
    Staff
    Customer Support

    Sorry my bad. This CSS – can you add the !important arg as listed below :

    .main-navigation li.two-column-menu > ul {
        display: grid !important;
        grid-template-columns: 50% 50%;
        width: 480px;
    }
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.