-
Tried using Navigation Alignment: Centered, but it centers the whole navigation, not menu only.
So instead of this:
https://prnt.sc/Jit5hOG5ZmmYWould like to have this:
https://prnt.sc/3TLHoLH2xj60 -
Hi there,
This should help: https://docs.generatepress.com/article/header-examples/#example-6
Let me know π
-
For some reason such code narrows the space available for menu items.
Instead of seeing all 10 menu items in a single line, it wraps into two lines containing 8 and 2 items.
-
Can you link us to the page in question so we can see the issue live?
You can use the private information field.
https://docs.generatepress.com/article/using-the-premium-support-forum/#private-informationLet me know π
-
Don’t have the website online, just locally.
Here is the screenshot:
https://prnt.sc/w0K3cjAp4s1M -
Try this for the full CSS:
@media (min-width: 769px) { .main-navigation:not(.toggled):not(.slideout-navigation) .main-nav > ul { position: absolute; top: 0; left: 50%; transform: translateX(-50%); } .main-navigation:not(.slideout-navigation) #menu-primary { width: 100%; justify-content: center; } }
It’s tough to deal with this many menu items so you might need to adjust the media query as you see fit.
Please create a staging site if you need further help with this.
Thanks!
-
Works like a charm. Again, many thanks Leo!
-
No problem π
-
This CSS also affects menu in off canvas panel on desktop, how to avoid it?
-
Edited the CSS here: https://generate.support/topic/center-menu-inside-primary-navigation/#post-105991
- You must be logged in to reply to this topic.