[Resolved] Help with CSS (space between languages in drop-down list)
This thread is resolved. Here is a description of the problem and solution.
Problem: The client is using the [wpml_language_selector_widget] shortcode to place a language switcher on their site and wants to increase the space between the languages in the dropdown list. The padding CSS property is not providing the desired effect. Solution: We recommend adding custom CSS to target the language switcher items directly. Here is the CSS code that should be added to the custom CSS section of the theme:
.wpml-ls-statics-shortcode_actions a {
padding-top: 18px !important;
padding-bottom: 18px !important;
padding-left: 15px !important;
}
Hello,
I have a rather simple question but can’t find the answer. I use shortcode [wpml_language_selector_widget] to place language switcher and trying to stylize it in the Language switcher options, Additional CSS. My problem is the languages in the drop-down list are too close to each-other. I need to increase the space between them and padding doesn’t help:
Thank you for contacting WPML Support. I’ve tried to visit your site but it seems your site is coming soon mode that’s why I can’t see the language switcher.
I just added the WPML language switcher with the [wpml_language_selector_widget] shortcode on my test site and I’m able to add the space between items by using the below CSS:
.wpml-ls-statics-shortcode_actions .wpml-ls-sub-menu a {
padding: 20px 5px;
}
In the custom CSS section of the theme and now it looks as in the attached screenshot. Could you please try to use the above CSS and see if this resolves your issue.
If the issue still persists, could you please try to disable the coming soon mode for a moment so that I can access to your site and provide you with correct CSS according to your site.
Hello, thank you for the code. It helped to increase the space between languages, but I also need to increase the padding top and bottom of the first item so it would look the same size as the sub-menu items. Also some padding to the left. I have enabled the site.