Last active
January 4, 2016 03:19
-
-
Save mov37/8561459 to your computer and use it in GitHub Desktop.
a starting point for creating bullet-proof responsive HTML emails
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<title>|*MAIL:TITLE*|</title> | |
<style type="text/css"> | |
/* | |
[NOTICE] | |
Before sending this mail: | |
(1) Validates markup and running tests, | |
if everything works fine then: | |
(2) Run it through a mail pre-processor | |
to strip out all comments(including this | |
one) and make all styles inline(except for | |
media queries - you may have to keep media | |
queries somewhere before processing and | |
then put it back as some pre-processor may | |
not reserve media queries, e.g: premailer). | |
(3) Validates markup and test again. | |
*/ | |
body { | |
margin: 0; | |
min-width: 100% !important; | |
padding: 0; | |
} | |
.content { | |
border-collapse: collapse; | |
max-width: 600px; | |
width: 100%; | |
} | |
@media only screen and (min-device-width: 601px) { | |
.content { | |
width: 600px !important; | |
} | |
} | |
</style> | |
</head> | |
<body yahoo> | |
<table bgcolor="#FFFFFF" border="1" cellpadding="0" cellspacing="0" width="100%" style="border-collapse: collapse;"> | |
<tr> | |
<td> | |
<!--[if (gte mso 9)|(IE)]> | |
<table align="center" border="1" cellpadding="0" cellspacing="0" width="600"> | |
<tr> | |
<td> | |
<![endif]--> | |
<table align="center" border="1" cellpadding="0" cellspacing="0" class="content"> | |
<tr> | |
<td>|*MAIL:BODY*|</td> | |
</tr> | |
</table> | |
<!--[if (gte mso 9)|(IE)]> | |
</td> | |
</tr> | |
</table> | |
<![endif]--> | |
</td> | |
</tr> | |
</table> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
via: 1 • 2 • 3