-
AuthorPosts
-
March 29, 2022 at 10:20 pm #1346483
Hi
I’m looking to centre the middle section of the top nav.
Currently it is set up with logo aligned left, menu items (Services | Prices | Sign up now | About | Contact Us) and then phone number and Free Trial aligned right.
What I’m looking to achieve is to align the middle bit to the centre. I currently have this set up using margins for various breakpoints (e.g @media only screen and (min-width: 1279px) and (max-width: 1365px){#menu-item-114 {margin: 0 20px 0 20px !important;}}), however this is not ideal.
Is there a way this can be achieved?
Kind regards
Duncan
March 30, 2022 at 10:40 am #1346542Hey dweddell,
Thank you for the inquiry.
Since the phone number and the free trial button is part of the menu container, there is no other way to center align the rest of the menu items aside from adjusting the margin between the very last menu item and the phone number. One workaround is to move the phone number and free trial button in a separate container or add them as widget. You can then adjust the style of this widget container separately. The following documentation should help.
// https://kriesi.at/documentation/enfold/header/#adding-a-header-widget-area
If you don’t want to use the widget, you can try this css code but you might still have to adjust the position of the phone number and the button on different screen sizes.
@media only screen and (min-width: 990px) { /* Add your Desktop Styles here */ .responsive #top .main_menu { width: 100%; left: 50%; transform: translateX(-50%); } .responsive #top .av-main-nav-wrap { float: left; position: relative; z-index: 3; left: 50%; transform: translateX(-50%); } .responsive #top #header #menu-item-67 { position: absolute; right: -400px; } .responsive #top #header #menu-item-114 { position: absolute; right: -200px; } }
Make sure to temporarily remove the previous css code after adding the above css.
Best regards,
IsmaelMarch 30, 2022 at 6:40 pm #1346642Thanks Ismael
March 31, 2022 at 7:15 am #1346701 -
AuthorPosts
- The topic ‘Centering part of menu on full width header’ is closed to new replies.