Site logo

Archived topic

GP 3 Main Nav Centered

9 replies · Started by Paul on September 22, 2020

Viewing posts 1–10 of 10

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.

Hi there,

Not sure if I fully understand.

Do you have an example?

Yeah apple.com or the apple developer site.

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

Thanks.

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.

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

Like dynamic menu item widths?

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

Yeah that's perfect, thanks.

No problem :)

This archived topic is closed to new replies.