Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save samudary/d5301e460498041f11f424cb2c6ef55f to your computer and use it in GitHub Desktop.
Save samudary/d5301e460498041f11f424cb2c6ef55f to your computer and use it in GitHub Desktop.
Drip Responsive Template (Beta)
<!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" />
<meta name="viewport" content="width=device-width"/>
<style type="text/css">
/**
* RESETS
*/
/* Based on The MailChimp Reset INLINE: Yes. */
/* Client-specific Styles */
#outlook a {padding:0;} /* Force Outlook to provide a "view in browser" menu link. */
body{width:100% !important; -webkit-text-size-adjust:none; -ms-text-size-adjust:none; margin:0; padding:0;}
/* Prevent Webkit and Windows Mobile platforms from changing default font sizes.*/
.ExternalClass {width:100%;} /* Force Hotmail to display emails at full width */
.ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div {line-height: 100%;}
/* Forces Hotmail to display normal line spacing. More on that: http://www.emailonacid.com/forum/viewthread/43/ */
#backgroundTable {margin:0; padding:0; width:600px !important; line-height: 100% !important;}
/* End reset */
/* Some sensible defaults for images
Bring inline: Yes. */
img {outline:none; text-decoration:none; -ms-interpolation-mode: bicubic;}
a img {border:none;}
.image_fix {display:block;}
/* Yahoo paragraph fix
Bring inline: Yes. */
p {margin: 1em 0;}
/* Hotmail header color reset
Bring inline: Yes. */
h1, h2, h3, h4, h5, h6 {color: black !important;}
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {color: blue !important;}
h1 a:active, h2 a:active, h3 a:active, h4 a:active, h5 a:active, h6 a:active {
color: red !important; /* Preferably not the same color as the normal header link color. There is limited support for psuedo classes in email clients, this was added just for good measure. */
}
h1 a:visited, h2 a:visited, h3 a:visited, h4 a:visited, h5 a:visited, h6 a:visited {
color: purple !important; /* Preferably not the same color as the normal header link color. There is limited support for psuedo classes in email clients, this was added just for good measure. */
}
/* Outlook 07, 10 Padding issue fix
Bring inline: No.*/
table td {border-collapse: collapse;}
/* Remove spacing around Outlook 07, 10 tables
Bring inline: Yes */
table { border-collapse:collapse; mso-table-lspace:0pt; mso-table-rspace:0pt; }
/* Styling your links has become much simpler with the new Yahoo. In fact, it falls in line with the main credo of styling in email and make sure to bring your styles inline. Your link colors will be uniform across clients when brought inline.
Bring inline: Yes. */
a {color: blue;}
/**
* LAYOUT
*/
* {
font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
}
body {
font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
}
table#body-wrap {
width: 100%;
}
/* Set a max-width, and make it display as block so it will automatically stretch to that width, but will also shrink down on a phone or something */
.container {
display: block!important;
max-width: 600px!important;
clear: both!important;
}
/* This should also be a block element, so that it will fill 100% of the .container */
.content {
max-width: 600px;
margin: 0 auto;
display: block;
}
/* Let's make sure tables in the content area are 100% wide */
.content table {
width: 100%;
}
img {
max-width: 100%;
}
/**
* MAIN CONTENT
*/
#main-content {
font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
font-size: 14px;
color: #222222;
line-height: 1.5;
padding: 25px;
}
#main-content h1 {
margin: 0 0 15px 0;
padding: 0;
font-size: 20px;
font-weight: bold;
}
#main-content h2 {
margin: 0 0 12px 0;
padding: 0;
font-size: 16px;
font-weight: bold;
}
#main-content h3 {
margin: 0 0 10px 0;
padding: 0;
font-size: 14px;
font-weight: bold;
}
#main-content b,
#main-content strong {
font-weight: bold;
}
#footer {
font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
font-size: 13px;
line-height: 1.5;
color: #777;
border-top: 1px solid #d0d0d0;
padding: 25px;
}
</style>
</head>
<body>
<table id="body-wrap">
<tr>
<td></td>
<td class="container">
<div class="content">
<table>
<tr>
<td>
<div id="main-content">
{{ email.html }}
</div>
{% unless footer.html == blank %}
<div id="footer">
{{ footer.html }}
</div>
{% endunless %}
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment