In my MS Dynamics email templates, I noticed that anything that comes after the last style block in the main css in the header, the text will all be centered in the email. Here's that style block:
In my MS Dynamics email templates, I noticed that anything that comes after the last style block in the main css in the header, the text will all be centered in the email. Here's that style block:
Hello.
The style you mentioned is used to center the email.
The width is set using general styles and it's meant to be centered when received. This is by design and just set the style on element with attribute data-layout="true".
But, this shouldn't break anything and the text should be left aligned by default:
This is because we add styles that are not visible in HTML tab, but they are in the final email.
The first div element in the body has attribute data-layout-version="v2" :
Without looking too deeply, I believe its a way of structuring the template and enabling drop and drag functionality. Sometimes this can cause interference with goals.
Yes, we've had to resort to that. But what is the purpose of the [data-layout] style and why is it centering text?
Yes margin:0 auto; centers. Have you tried going to the text element and adding text-align:left; or float:left or something similar?
In further investigation, it looks like Dynamics is favoring <th> instead of <td> in tables. That could be the issue too.
André Arnaud de Cal... 291,642 Super User 2024 Season 2
Martin Dráb 230,371 Most Valuable Professional
nmaenpaa 101,156