Site logo

Archived topic

Centre Navigation and Logo Like GP Site

5 replies · Started by EcoDev on February 3, 2021

Viewing posts 1–6 of 6

Hello,

I would like my logo and navigation to behave like the GP site where at a certain browser size the navigation centres below a centred logo. I thought this would be set with Navigation Drop Down but it doesn't seem to work for me. I'm using Flexbox structure and navigation as header.

Thanks

Hi there,

you would need to disable the Navigation as Header option for the Navigation Drop Down to work.
Or with the nav as header you can try this CSS:

@media(max-width: 1024px) and (min-width: 769px) {
  .navigation-branding {
    flex: 1 0 100%;
  }
  #primary-menu {
    margin-right: auto; /* optional - push nav left */
  }
}

Adjust the max-width: 1024px for where you want it to kick in.

Thanks David. Is there any way of getting everything centred too (including the search icon)?

Thanks

Hi Joel,

You could use this CSS:

.menu-bar-items {
    margin-right: auto;
}

Instead of:

#primary-menu {
    margin-right: auto; /* optional - push nav left */
  }

Let me know :)

Thanks Ying, it's ok I've gone with David's original suggestion of disabling navigation as header.

Thanks

No problem :)

This archived topic is closed to new replies.