Skip to content

Instantly share code, notes, and snippets.

@iamSampath
Forked from elidickinson/max_width_email.html
Created August 2, 2016 18:21
Show Gist options
  • Save iamSampath/56989b465eb98396531180345de538b3 to your computer and use it in GitHub Desktop.
Save iamSampath/56989b465eb98396531180345de538b3 to your computer and use it in GitHub Desktop.
Email Template trick: max-width with outlook
<!--[if mso]>
<center>
<table><tr><td width="580">
<![endif]-->
<div style="max-width:580px; margin:0 auto;">
<p>This text will be centered and constrained to 580 pixels even on Outlook which does not support max-width CSS</p>
</div>
<!--[if mso]>
</td></tr></table>
</center>
<![endif]-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment