Skip to content

Instantly share code, notes, and snippets.

@JacobLett
Last active March 6, 2019 08:51
Show Gist options
  • Select an option

  • Save JacobLett/e4c4cee48e296759a89a194c5573ee51 to your computer and use it in GitHub Desktop.

Select an option

Save JacobLett/e4c4cee48e296759a89a194c5573ee51 to your computer and use it in GitHub Desktop.
html email responsive images
<!--[if (gte mso 9)|(IE)]>
<table cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td valign="top" width="260">
<![endif]-->
<p><a href="#"><span style="color: #666666;"> <img src="#" alt="#" style="width: 100%; max-width: 600px; display: block; border: 0px; margin-bottom: 5px;" border="0"> </span></a></p>
<!--[if (gte mso 9)|(IE)]>
</td>
</tr>
</tbody>
</table>
<![endif]-->
<!--[if mso]>
<v:shape>...</v:shape>
<div style="width:0px; height:0px; overflow:hidden; display:none; visibility:hidden; mso-hide:all;">
<![endif]-->
[fallback goes here]
<!--[if mso]></div><![endif]-->
This is a good reference on usage of mso-hide:all https://stackoverflow.com/questions/18254711/html-emails-fallback-for-mso-conditional
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment