Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mj-divider not centered on outlook #382

Closed
Grafikart opened this issue Sep 8, 2016 · 8 comments
Closed

mj-divider not centered on outlook #382

Grafikart opened this issue Sep 8, 2016 · 8 comments

Comments

@Grafikart
Copy link

Dividers works on gmail but when opened online with outlook.com they are aligned to the left

<mj-divider width="100px" border-color="#033242" border-width="1px">

Screenshots :

Gmail

Outlook

Email code

Gmail renders HTML this way

<td style="word-break:break-word;font-size:0px;padding:10px 25px;border-collapse:collapse">
<p style="font-size:1px;margin:0 auto;border-top:1px solid #033242;width:100px;display:block"></p></td>

Outlook this way

<td style="word-break:break-word;font-size:0px;padding:10px 25px;">
<p style="font-size:1px;border-top:1px solid #033242;width:100px;"></p>
</td>
@ngarnier
Copy link
Member

ngarnier commented Sep 9, 2016

Thanks @Grafikart. Could you also please join the MJML used?

Cheers!

@Grafikart
Copy link
Author

Grafikart commented Sep 9, 2016

<mjml>
    <mj-head>
        <mj-attributes>
            <mj-divider width="100px" border-color="#033242" border-width="1px"/>
        </mj-attributes>
    </mj-head>
    <mj-body>
        <mj-container>
            <mj-section>
                <mj-column>
                    <mj-text mj-class="title">STORIES FROM THE FIELD</mj-text>
                    <mj-divider></mj-divider>
                </mj-column>
            </mj-section>
        </mj-container>
    </mj-body>
</mjml>

@tcaddy
Copy link

tcaddy commented Sep 9, 2016

Can you wrap this content in a <center> tag to workaround this issue? I had some text that wasn't centered in MS Outlook (despite declaring it centered in the <mj-section> and <mj-text> tags). Wrapping it in the <center> tag fixed the issue in Outlook.

@iRyusa
Copy link
Member

iRyusa commented Oct 20, 2016

Outlook.com remove margin by default... mhh we have to find another way to align without it..

@iRyusa
Copy link
Member

iRyusa commented Nov 14, 2016

Ok we have to replace every margin by Margin and it will fix this.. cf hteumeuleu/email-bugs#6 Silly outlook

@Grafikart
Copy link
Author

Nice catch 👍

@ngarnier ngarnier added this to the 3.3.0 milestone Jan 16, 2017
@ngarnier ngarnier modified the milestones: 3.3.2, 3.3.0 Mar 17, 2017
@iRyusa
Copy link
Member

iRyusa commented Mar 28, 2017

Small update here, it will no longer be the case in MJML4. So i'm adding it to the 4.0 milestone instead of 3.3.X

@iRyusa iRyusa modified the milestones: 4.0.0, 3.3.2 Mar 28, 2017
@iRyusa iRyusa added the MJML 4 label Apr 6, 2017
@ngarnier
Copy link
Member

This should be fixed in the latest MJML 4 beta, install with npm install mjml@next.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants