Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
The language switcher flag is aligned to the top of the mobile header instead of the middle, unlike other icons.
Solution:
We recommend adjusting the CSS for the mobile language switcher. Specifically, you should modify the CSS to remove the bottom margin from the

.widget

class. Here is the CSS affecting the issue:

.widget {<br />    margin: 0 0 40px;<br />    padding: 0;<br />}

By removing the

margin: 0 0 40px;

line, the switcher should align properly in the middle of the mobile header.

Please note that this solution might be irrelevant if it's outdated or not applicable to your case. We highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the issue persists, please open a new support ticket.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 1 replies, has 0 voices.

Last updated by Bobby 1 week, 4 days ago.

Assisted by: Bobby.

Author Posts
February 9, 2026 at 4:54 pm #17806438

jean-philippeK

my flag is working fine in all my headers but in the mobile header its aligned to the top of the header and not the middle like my other icons.

February 9, 2026 at 5:39 pm #17806553

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Hi there,

I took a look at your website and noticed that the mobile language switcher has the following CSS affecting it.

.widget {
    margin: 0 0 40px;
    padding: 0;
}

If possible, please remove the bottom-margin 40px; and the switcher will be aligned.

Screenshot 2026-02-09 at 9.30.55 AM.png