Problem:
The client is trying to remove the padding-right on the language switcher in the top menu on the right but is unable to target the switcher properly or override the properties due to multiple !important tags.
Solution:
1. The issue might be related to the CSS from WordPress itself, specifically from the Gutenberg block styles. The padding might be set by the following CSS rule in the file
/wp-includes/css/dist/block-library/style.min.css?ver=6.9
:
.wp-block-navigation-item.open-on-click .wp-block-navigation-submenu__toggle {
padding-left: 0;
padding-right: .85em;
}
To override this, add the following CSS rule in WPML > Languages > Language switcher options > Additional CSS:
.wp-block-navigation-item.open-on-click .wp-block-navigation-submenu__toggle {
padding-left: 0;
padding-right: 0 !important;
}
2. If the issue persists, it might be due to the theme. We recommend testing with a different theme, such as the Twenty Twenty Five Theme, to see if the issue still occurs. You can use a WPML test site to experiment with different themes and settings.
3. Additionally, the padding issue might be influenced by CSS Flexbox properties set in the class
.wp-block-navigation__container
from the file
/wp-includes/blocks/navigation/style.css
, which uses
.
If these solutions do not resolve the issue or seem outdated, we highly 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 persists, please open a new support ticket.