Created
September 11, 2015 19:37
-
-
Save juniorbird/b0f934422bd60d2eb309 to your computer and use it in GitHub Desktop.
How to not have empty lines after images in e-mails.
This file contains 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
<style="text/css"> | |
.someclass a { | |
display: inline-block; | |
} | |
.someclass a img { | |
display: block; | |
} | |
</style> | |
<table> | |
<tr class="someclass"> | |
<td class="someclass" style="margin: 0; font-size: 0; line-height: 0;"> | |
<img src="your image here"><img src="your image here"> | |
</td> | |
</tr> | |
</table> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note that all
<img>
tags must be on the same line. Don't wrap<img>
s in block-level elements (inline elements, like<a>
, are just fine).If you don't do this, then you'll get a space that is neither padding nor margin between the two
<img>
s, if they're on different lines, in webmail readers.