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.

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by Mihai Apetrei 1 year, 10 months ago.

Assisted by: Mihai Apetrei.

Author Posts
August 11, 2023 at 10:30 pm #14190939

小林 且昌

li.wpml-ls-menu-item ul li a {
width: auto;
}

doesnt work.

what is css code do i need to write?

and flag is not aligned at center (its located to top) i want it at center (it needs to be located at little down).

写真-2023-08-12-7-23-31.jpg
August 14, 2023 at 8:36 am #14195923

Mihai Apetrei
WPML Supporter since 03/2018

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hi there.

You can use CSS like this example here:


/* Make the flag show correctly aligned in the middle vertically */
ul .wpml-ls-menu-item a {

display: block !important;

}

/* Make width automatic */
.p-global-nav .sub-menu a {

width: auto !important;

}

Mihai Apetrei

August 15, 2023 at 9:29 am #14201995

小林 且昌

This is worked.

/* Make the flag show correctly aligned in the middle vertically */
ul .wpml-ls-menu-item a {

display: block !important;

}

flag width auto, all global navi and sub navi has changed to narrow. i want only language switcher flag to be auto width.

/* Make width automatic */
.p-global-nav .sub-menu a {

width: auto !important;

}

August 16, 2023 at 5:44 am #14205951

Mihai Apetrei
WPML Supporter since 03/2018

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hi there.

You can try this instead for the width request:


.p-global-nav .sub-menu .wpml-ls-item a {

width: auto !important;

}

Mihai

August 17, 2023 at 9:14 am #14244231

小林 且昌

Perfectly worked, thank you