Skip to content

Instantly share code, notes, and snippets.

@spiritphyz
Last active December 12, 2017 22:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spiritphyz/fded3ae3cd768c6ec115a36f1e5cbcbf to your computer and use it in GitHub Desktop.
Save spiritphyz/fded3ae3cd768c6ec115a36f1e5cbcbf to your computer and use it in GitHub Desktop.
<!--
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 '&#xA0') 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">&#xA0;</td>
</tr>
</table>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment