Skip to content

Instantly share code, notes, and snippets.

@strarsis
Forked from elidickinson/max_width_email.html
Created September 25, 2020 06:13
Show Gist options
  • Save strarsis/4d5bad51a091257ae6983f15e029b975 to your computer and use it in GitHub Desktop.
Save strarsis/4d5bad51a091257ae6983f15e029b975 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