Last active
December 12, 2017 22:24
-
-
Save spiritphyz/fded3ae3cd768c6ec115a36f1e5cbcbf to your computer and use it in GitHub Desktop.
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
<!-- | |
In the table below, if you make all 3 CSS rules the same pixel height, then the vertical spacing | |
will be consistent across all browsers, including MS Outlook 2007+ rendering engine: | |
<td> height: 16px | |
font-size: 16px | |
line-height: 16px | |
These conditions must be true: | |
1. "mso-line-height: exactly" is set | |
2. you have a non-breaking space (or Unicode ' ') in the <td> tag | |
3. you put your CSS rules in the <td> tag | |
Basically, this workaround table is to avoid the undesirable behavior of Outlook collapsing white space | |
around some types of block-level elements, including <img>, <p>, and <div> tags. | |
--> | |
<!-- spacer table for HTML emails --> | |
<table class="spacer" style="border-collapse:collapse;border-spacing:0"> | |
<tr> | |
<td height="16px" style="margin:0;padding:0;border-collapse:collapse!important;font-family:Helvetica,Arial,sans-serif;font-weight:400;font-size:16px;line-height:16px;mso-line-height-rule:exactly"> </td> | |
</tr> | |
</table> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment