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 1 reply, has 2 voices.

Last updated by Bruno Kos 3 months ago.

Assigned support staff: Bruno Kos.

Author Posts
July 24, 2019 at 9:42 am #4272475

camilleG-6

I am trying to translate my website from french to english.
I was expecting to get the same layout on my english page than my french one, but it's not working.

fr : hidden link
en : hidden link

Could you please tell me what to do ?

July 24, 2019 at 10:37 am #4273215

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

Thank you for contacting WPML support!

I have checked both pages and seemingly they look exactly the same. However, I assume that you are referring to differences in spacing, correct?

I believe that the reason for this is because you have created some CSS, such as:

#post-4100 h2, #post-4266 h2 {
    text-transform: none;
    color: #272457;
    line-height: 1.2;
    font-family: "Touche";
}

However, the post ID on translated pages (unless these are duplicates, which are not in this case) will be different, because a translation is in fact a different page. So the above code will not work on hidden link, because this page has ID 6074, so you would need to create CSS styles for these new page translations as well, so something like:

#post-6074 h2{
    text-transform: none;
    color: #272457;
    line-height: 1.2;
    font-family: "Touche";
}

WPML does not handle this cases, because it does not read CSS trying to find if some CSS is applied to a particular page, thus finding the corresponding ID of translation and update CSS accordingly, this would be impossible scenario if you ask me :).

Regards,
Bruno Kos