Skip Navigation

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 1 reply, has 2 voices.

Last updated by Mihai Apetrei 1 year, 2 months ago.

Assisted by: Mihai Apetrei.

Author Posts
October 23, 2023 at 3:26 pm #14639763

ulrikeI

Hello,

I am running a WPML setup with two languages and separate domains for each language.

I would like to add a bit of custom CSS code to the translated US version (.com domain) whilst leaving the original german version (.de domain) alone.

In other words, is it possible to add custom CSS that affects only one language? If so how?

I should probably clarify that I am not referring to the language switcher. I have seen that there is the option to add custom CSS, but I assume this is only to style the language switcher itself.

Thank you very much.

October 24, 2023 at 7:17 pm #14650495

Mihai Apetrei
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+02:00)

Hi there.

You can write custom CSS and target specific languages as shown in my example below:


/* This can be used for German */

html[lang="de-DE"] {

font-size: 24px !Important;
 
}

/* This can be used for English */

html[lang="en-US"] {

font-size: 24px !Important;
 
}

Mihai Apetrei