[Resolved] GP 3 Main Nav Centered

Home Forums Support [Resolved] GP 3 Main Nav Centered

Home Forums Support GP 3 Main Nav Centered

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1454491
    Paul

    With GP 3 adopting flexbox as default, how can I use main navigation as header, centered, and with the logo/nav items filling the available space evenly until the mobile header kicks in?

    Thanks,
    Paul.

    #1454516
    Leo
    Staff
    Customer Support

    Hi there,

    Not sure if I fully understand.

    Do you have an example?

    #1454529
    Paul

    Yeah apple.com or the apple developer site.

    Note – I don’t see any customizer options to align the nav in GP 3.

    Thanks.

    #1454530
    Leo
    Staff
    Customer Support

    This should work:
    https://www.screencast.com/t/YQLelstNMpFH

    Can you make sure you are using the latest GP Premium 1.12 RC1?

    There was a bug with the options not showing before but it should be fixed:
    https://generatepress.com/gp-premium-1-12-0/

    #1454552
    Paul

    Yeah that does centre the nav but I was looking for it to expand to fill the available space, regardless of the number of menu items. I don’t mind using CSS but from the examples I’ve found nothing has an effect.

    #1454656
    Leo
    Staff
    Customer Support

    I can’t quite picture what you are wanting to do here.

    Like dynamic menu item widths?

    #1456139
    Paul
    #1456279
    Leo
    Staff
    Customer Support

    uhh in that case wouldn’t the logo always just be on the left?

    What if you set the alignment to right instead, then try some CSS like this?

    @media (min-width: 769px) {
        .main-navigation:not(.slideout-navigation) .main-nav {
           flex: 1;
        }
        .main-navigation ul.menu {
            display: flex;
            justify-content: space-between;
        }
    }

    Should be something like this:
    https://www.screencast.com/t/of8Q57ARRD

    #1458348
    Paul

    Yeah that’s perfect, thanks.

    #1458675
    Leo
    Staff
    Customer Support

    No problem 🙂

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.