Created
May 6, 2013 15:10
-
Star
(162)
You must be signed in to star a gist -
Fork
(18)
You must be signed in to fork a gist
-
-
Save elidickinson/5525752 to your computer and use it in GitHub Desktop.
Email Template trick: max-width with outlook
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--[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
@philipp-klinz Great job this works perfectly to center object without center text.
If someone want to center object and text, simply use
style="text-align:center;
.