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.

Our next available supporter will start replying to tickets in about 5.41 hours from now. Thank you for your understanding.

This topic contains 1 reply, has 2 voices.

Last updated by Andreas W. 2 days, 13 hours ago.

Assisted by: Andreas W..

Author Posts
September 26, 2024 at 9:17 pm #16227557

stefanE-16

Background of the issue:
I am trying to align the language switcher flags correctly on my site hidden link. This issue was previously resolved in this thread: https://wpml.org/forums/topic/flags-do-not-horizontally-align-when-using-twenty-twenty-four-fse-theme/. The problem reappeared after adding the Language Switcher to the Site Editor navigation. I have tried various CSS solutions based on the last issue and documentation but still cannot get it to work correctly.

Symptoms:
When the main language is selected, the secondary flag is misaligned horizontally. The alignment changes when I click the secondary language flag.

Try it out here: hidden link

Questions:
Why are the language switcher flags misaligned horizontally when the main language is selected?
Could adding the Language Switcher to the Site Editor navigation cause this issue?
What CSS solutions can I try to fix the flag alignment issue?

September 27, 2024 at 6:31 am #16228168

Andreas W.
Supporter

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hi,

Could you please give this a try:

.wp-block-navigation .wpml-language-switcher-navigation-block ul.horizontal-list li {
    display: contents;
}

I hope this helps, if not let me know.

Best regards
Andreas

September 27, 2024 at 10:27 pm #16231347

stefanE-16

Great! That worked nicely.

Thank you.

Hopefully this will be added into WPML so that I do not need to use the code snippet.

stefanE-16 confirmed that the issue was resolved on 2024-09-27 22:27:58.
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.