Skip to content Skip to sidebar

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

Problem:
If you're using the Divi theme and notice an empty space before the flag and language in your language switcher dropdown menu, it might be due to the Critical CSS feature altering CSS priorities or broad custom CSS selectors affecting the dropdown.
Solution:
We recommend adding the following CSS code to your site to correct this issue. You can add this code via WP Dashboard > Appearance > Customize > Additional CSS or through any other CSS section provided by the Divi theme:

#et-secondary-nav li>ul.sub-menu {<br />    width: 75px;<br />}<br /><br />#et-secondary-nav li>ul.sub-menu li {<br />    text-align: center;<br />}

This CSS should help align the elements properly and remove the unwanted space.

Please note that this solution might become irrelevant due to updates or may not apply to your specific 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 1 voice.

Last updated by Christopher Amirian 1 month, 2 weeks ago.

Assisted by: Christopher Amirian.

Author Posts
March 26, 2026 at 8:16 pm #17930590

arnoK-9

I use divi. My language switcher is before top-menu; dropdown with flag en language. In the dropdown it shows an empty space, than the flag, than the language (e.g. 'EN'). How to get ride of the empyu space?

March 29, 2026 at 12:25 pm #17934631

Christopher Amirian
WPML Supporter since 07/2020

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi,

Welcome to WPML support. It seems that you use the Critical CSS feature, which somehow changes the priority of CSS. Also there are some custom CSS you use tha tthe selector of them are too broad and it affects the language switcher dropdown menu.

I created a CSS code that will override that behavior. Please add the CSS code below to WP Dashboard > Appearance > Customize > Additional CSS or wherever the Divi theme allows you to add CSS:

#et-secondary-nav li>ul.sub-menu {
    width: 75px;
}

#et-secondary-nav li>ul.sub-menu li {
    text-align: center;
}

Thanks.