Skip to content Skip to sidebar

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

Problem:
The client is using WPML on their website and wants to make the background color of the language switcher widget in the header completely transparent. Additionally, they want only the current language to appear transparent while the dropdown menu displays in a chosen color.
Solution:
We recommended adding specific CSS to the custom CSS section of the theme to achieve this. To make the background color of the language switcher widget transparent, use the following CSS:

.wpml-ls-sidebars-header_right.wpml-ls-legacy-dropdown, .wpml-ls-legacy-dropdown .wpml-ls-current-language:hover>a .wpml-ls-legacy-dropdown a:focus, .wpml-ls-legacy-dropdown a:hover{ background: transparent !important; }

.wpml-ls-sidebars-header_right.wpml-ls-legacy-dropdown a, .wpml-ls-legacy-dropdown .wpml-ls-current-language:hover>a, .wpml-ls-legacy-dropdown a:focus, .wpml-ls-legacy-dropdown a:hover { border: none !important; }

To apply a white background color to the dropdown menu, add this CSS:

.wpml-ls-sidebars-header_right .wpml-ls-sub-menu { background: #fff !important; }

You can change '#fff' to any color as per your preference. For more details on customizing the language switcher, visit how to fix styling and CSS issues for the language switchers.
If this solution does not fully address your issue or seems outdated, 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 further assistance is needed, 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.

Tagged: 

This topic contains 3 replies, has 0 voices.

Last updated by ignacioC-10 2 months, 3 weeks ago.

Assisted by: Noman.

Author Posts
August 27, 2025 at 9:35 am #17351043

ignacioC-10

Background of the issue:
I’m using WPML on a website I’m developing. In the top right corner of the header, I’ve included the language switcher widget. Each page in that area has a different background color.

Symptoms:
I know I can set the background color for the widget, but I would like to make that color completely transparent.

Questions:
Is there an option to make the background color of the language switcher widget completely transparent?

August 27, 2025 at 10:57 am #17351482

Noman
WPML Supporter since 06/2016

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting WPML Support. Yes, you can make it transparent by adding the below CSS in the custom CSS section of the theme:

.wpml-ls-sidebars-header_right.wpml-ls-legacy-dropdown, 
.wpml-ls-legacy-dropdown .wpml-ls-current-language:hover>a 
.wpml-ls-legacy-dropdown a:focus, .wpml-ls-legacy-dropdown a:hover{
	background: transparent !important; 
}

.wpml-ls-sidebars-header_right.wpml-ls-legacy-dropdown a,
.wpml-ls-legacy-dropdown .wpml-ls-current-language:hover>a, 
.wpml-ls-legacy-dropdown a:focus, .wpml-ls-legacy-dropdown a:hover {
	border: none !important; 
}

And it will look as in the attached screenshot.

Here is a doc for more details: https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/how-to-fix-styling-and-css-issues-for-the-language-switchers/

Please let me know if this resolves the issue or if you need further assistance with this issue.

Thank you

lang switch dropdown.jpg
August 27, 2025 at 11:13 am #17351571

ignacioC-10

Great
It’s almost perfect. Would it be possible for only the current language to appear transparent, and for the dropdown menu with the language options to display in the color I’ve chosen?

Thank you very very much!!!

August 27, 2025 at 4:11 pm #17352559

Noman
WPML Supporter since 06/2016

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thanks for the additional details. Please add the below CSS in the custom CSS section of the theme and it will apply the white background color to the dropdown:

.wpml-ls-sidebars-header_right .wpml-ls-sub-menu {
	background: #fff !important;
}

You may update white color to any color according to your needs.

Please let me know if this resolves the issue or if you need further assistance with this issue.

Thank you

main page.jpg
inner page style.jpg
August 28, 2025 at 7:00 am #17353503

ignacioC-10

Great, great, great support!!!!!