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 thread is resolved. Here is a description of the problem and solution.

Problem:
I need to find the right custom css for the dropdown sub-menu width because it's currently larger than it should be.

Solution:
Please try to use following CSS in your theme’s or child theme style.css file OR Custom CSS section of the theme:

.wpml-ls-item ul {
    width: auto !important;
}

with only this css width problem is resolved but the flag is not centered, so i had to add this :

 .wpml-ls-item {
  padding-left:0px!important;
}
.wpml-ls-link {
     padding-left:0px!important;
          width: auto !important;
}

This topic contains 3 replies, has 3 voices.

Last updated by ilhanD 6 months, 3 weeks ago.

Assigned support staff: Noman.

Author Posts
March 26, 2019 at 9:00 am #3460525

maivaG

I just have to find the right custom css for the dropdown sub-menu width because it's currently larger than it should be.

March 26, 2019 at 9:20 am #3460725

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

This issue can be fixed using small CSS code. I have tried to open your site but it seems your site is in coming soon mode that’s why I couldn’t check accurate CSS classes. Could you please try to use following CSS in your theme’s or child theme style.css file OR Custom CSS section of the theme:

.wpml-ls-item ul {
    min-width: auto !important;
}

And let me know how it goes?

If still issue persists, please disable coming soon mode for a while so that I can provide you correct CSS.

Thank you

March 27, 2019 at 3:26 pm #3472679

maivaG

Hello Noman,

Thank you very much.
Your css didn't work but helped me to find the solution.
In my case, here is the CSS that works :

.wpml-ls-item ul {
    width: auto !important;
}

with only this css width problem is resolved but the flag is not centered, so i had to add this :

 .wpml-ls-item {
  padding-left:0px!important;
}
.wpml-ls-link {
     padding-left:0px!important;
          width: auto !important;
}

Thanks again, hope it will help someone else.

October 11, 2019 at 1:59 pm #4739263

ilhanD

Hi Maiva G,
Thank you for the code, exactly what I was looking for!