Archived topic
main Menu centered
6 replies · Started by Torsten on October 23, 2020
Hi,
I,ve set the content area to a max-width of 1300px, centered.
How could I get the primary menu right aligned with the content area and the secondary menu left aligned?
I probably need to give the menus some additional padding in px...
best regards,
Torsten
Hi there,
you have some custom CSS that is affecting the position/padding of the navigation.
Without that CSS, you can simply set the Customizer > Layout > Primary Navigation --> Inner Navigation Width to Contained:
https://docs.generatepress.com/article/primary-navigation-layout-overview/
But its not going to work with additional CSS you have added.
Hi David,
could you take another look at the website?
I deleted all custom css and used your settings as indicated.
Only now the header bar background is not running full width, nor the secondary menu (on desktop).
Can you help,
best,
Torsten
and I can't set a right-margin for the primary menu, I tried
.main-navigation .main-nav ul li a, .menu-toggle, .main-navigation .mobile-bar-items a {
padding-right: 20px;
}
best,
Torsten
sorry, it's working.
Only now the header bar background is not running full width, nor the secondary menu (on desktop).
Is the navigation width set to full for both the primary and secondary navigation?
https://docs.generatepress.com/article/navigation-layout/#navigation-width
https://docs.generatepress.com/article/secondary-navigation-layout/#navigation-width
lovely,
thanks a lot.
best,
Torsten
No problem :)