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.
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
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.