Skip to content

Instantly share code, notes, and snippets.

@AndrewPix
Forked from elidickinson/max_width_email.html
Created June 20, 2016 08:39
Show Gist options
  • Save AndrewPix/493f0764c02fea44c0d2953aff4f1cfc to your computer and use it in GitHub Desktop.
Save AndrewPix/493f0764c02fea44c0d2953aff4f1cfc 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