Skip to content

Instantly share code, notes, and snippets.

@stoyanvi
Last active December 11, 2017 15:15
Show Gist options
  • Save stoyanvi/8706935 to your computer and use it in GitHub Desktop.
Save stoyanvi/8706935 to your computer and use it in GitHub Desktop.
HTML Email Template: max-width hack for MS Outlook
<!--[if (gte mso 9)|(IE)]>
<center>
<table>
<tr>
<td width="600">
<![endif]-->
<div style="max-width: 600px; margin: 0 auto;">
<p>This text will be centered and constrained to 600 pixels even on Outlook which does not support max-width CSS</p>
</div>
<!--[if mso]>
</td>
</tr>
</table>
</center>
<![endif]-->
@AitorRodriguez990
Copy link

This solution only works on Outlook 2000?

@rawa29
Copy link

rawa29 commented Oct 3, 2016

Not working on MS Outlook 2016 for me. :/

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