Site logo

Archived topic

Left align content of generate_inside_mobile_header hook

5 replies · Started by Bandara on September 10, 2021

Viewing posts 1–6 of 6

I'm using the generate_inside_mobile_header hook to insert some text but I can't figure out how to make it left justified instead of right. I'm sure it must be something simple, but I'm missing it. I have a logo on the far left and I want to keep the hamburger icon on the right.

Hi there,

Can you give that element a class and remove the inline HTML style first?

Let me know :)

Sure! That's done. The class is site-title-mobile.

Do I then need to style it in custom css?

Try this:

@media (max-width: 768px) {
    .mobile-header-navigation.has-menu-bar-items .mobile-header-logo {
        margin-right: 0;
    }
    .main-navigation .inside-navigation {
        justify-content: flex-start;
    }
    #mobile-header .menu-toggle {
        margin-left: auto;
    }
}

Perfect!

I would have never figured that out on my own. Thank you.

No problem :)

This archived topic is closed to new replies.