Site logo

Archived topic

Mobile menu layout help and menu breaking points for desktop

19 replies · Started by Zoran on December 8, 2018

Viewing posts 1–15 of 20

Hi

I'm trying to achieve this layout on mobile: https://www.betreuungmitherz.ch/ but I've had little luck!

Also, I've noticed that when I resize the screen the menu breaks into multiple rows. How do I stop it from doing that? I want it to remain in one row (below the logo if there is no space)?

Preview

Hi Tom,

I cannot use the float option as the current configuration has the header as hidden and the navigation is Below header (I linked it in my previous post).

Ah, sorry about that!

Try this:

@media (max-width: 1200px) {
    .main-navigation .navigation-logo {
        float: none;
        margin: 0 auto;
    }

    .main-navigation .navigation-logo img {
        margin: 0 auto;
    }

    .nav-aligned-right .main-navigation {
        text-align: center;
    }
}

Hi,

This works like a charm (just set the max-width query to 1460px), thank you!

I'm still left with the mobile menu being centered below the logo

Screenshot

I have tried the mobile header idea and it did not work.

What about it didn't work exactly? The mobile header is the best way to get the mobile toggle to the right of the logo.

Activating it doesn't really change much. It's still below the logo.

Your logo is too wide for it to fit.

You can try adding something like this:

.mobile-header-logo img {
    width: 50%;
}

Doesn't work.

It doesn't work. There's a margin on the image that I can't get rid of for some reason.

It's hard for me to tell what's going on without being able to inspect the code myself. Any chance you can save the mobile header option so I can take a look? You can remove that CSS for now.

Hi, yes, sorry, I've enabled the mobile header now.

So that's happening because of this custom CSS:

@media (max-width: 768px) {
    .menu-toggle {
        margin-left: 25%;
        margin-right: 37%;
    }
}

If you remove that, it should work.

Let me know :)

Hi Tom,

Removing that CSS didn't help (I tried it before, too, it is removed now).

This archived topic is closed to new replies.