This thread is resolved. Here is a description of the problem and solution.
Problem:
If you're experiencing issues with the alignment and spacing of language flags in the WPML language switcher, particularly when your website is in RTL or LTR mode, the problem might be due to CSS conflicts or custom code affecting the display.
Solution:
First, check if there is any custom CSS or code from your theme or plugins that might be overriding WPML's default styles. Specifically, issues can arise from the theme or other plugins like greenshift blocks that add custom styles to elements used by WPML. If you find such CSS, you can either remove it or add the following CSS code to your theme to correct the spacing issue:
body .wpml-language-switcher-block ul.hasSpacing.isHorizontal li:not(:last-child) {<br /> margin-right: 0 !important;<br /> margin-top: 0 !important;<br />}Alternatively, if the issue is caused by specific plugin CSS, you might need to override it with:
.wpml-language-switcher-block ul.hasSpacing.isHorizontal li:not(:last-child) {<br /> margin-right: var(--language-spacing) !important;<br />}If these solutions do not resolve the issue or if the problem persists, it might be due to other underlying factors. We 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 problem still exists, please open a new support ticket with us for further assistance at WPML support forum.
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 5 replies, has 0 voices.
Last updated by 1 month ago.
Assisted by: Christopher Amirian.
