-
randika
Hi,
I’ve been working on refining the mobile navigation layout for my site and encountered a few issues with the current setup. Specifically, the logo is not positioned correctly, and the search and cart icons aren’t aligned as intended.
To give you a better idea, here’s what I’m aiming for with the layout:
•The toggle menu (hamburger menu) should be on the left.
•The logo should be centered but closer to the toggle menu on the left.
•The search icon and cart icon should be aligned on the right side.I have entered my website address in private information.
Best,
Willya -
Alvind
Hi there,
Try this CSS:
@media screen and (max-width: 768px) { .inside-header.grid-container { display: flex; justify-content: space-between; align-items: center; } .menu-bar-items { order: 3; } .menu-toggle { order: 1; } .site-logo { order: 2; } }
-
randika
Hi Alvind,
I’ve added the CSS you provided, but it doesn’t seem to be working as expected. Could you please take a look at the live URL and see the result for yourself?
-
Hi there,
remove that CSS, and try this:
@media(max-width: 1188px){ header .inside-header { position: relative; padding-left: 80px; } .main-navigation .menu-toggle { position: absolute; left: 20px; } nav.slideout-navigation.do-overlay .slideout-exit { position: fixed !important; right: unset; left: 24px; top: 4px; } }
in the CSS, you will see this rule:
nav.slideout-navigation.do-overlay .slideout-exit { position: fixed !important; right: unset; left: 24px; top: 4px; }
That is optional is simply positions the Close icon toggle in the same place as the hamburger toggle.
-
randika
Wow, thanks David. You saved my day.
-
Glad to be of help
- You must be logged in to reply to this topic.