Site logo

Archived topic

Language switcher floating right of the navigation

3 replies · Started by Javier on November 22, 2021

Viewing posts 1–4 of 4

Hello, I want know if I can achieve this:

Place an wpml language switcher floating right of the navigation.

I have set the header inner width to full-width and I want to have the navigation cantered on the content and floating on the right the language switcher.

It's something as you can see in this image here:

Menu with language switcher floating right

Thanks

Hi there,

try adding this CSS:

@media(min-width: 1000px) {
    .main-navigation,
    .main-navigation .main-nav {
        flex: 1;
    }
    .main-navigation .main-nav>ul > li:first-child,
    .main-navigation .main-nav>ul > li:last-child {
        margin-left: auto;
    }
}

You will need to adjust the 1000px for the @media breakpoint to suit your needs.

It's working like a charm,

Thank you David!

Glad to hear that!

This archived topic is closed to new replies.