Skip to content

Commit b055efe

Browse files
authored
Merge pull request #65 from leemunroe/bugfixes
Minor bug fixes
2 parents e30c0ba + 4ddac95 commit b055efe

File tree

4 files changed

+104
-76
lines changed

4 files changed

+104
-76
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
.DS_Store
1+
.DS_Store
2+
node_modules
3+
.gitignore

email-inlined.html

Lines changed: 79 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,138 +1,159 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html>
33
<head>
44
<meta name="viewport" content="width=device-width">
55
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
66
<title>Simple Transactional Email</title>
7-
<style type="text/css">
7+
<style>
88
/* -------------------------------------
9-
INLINED WITH https://putsmail.com/inliner
9+
INLINED WITH htmlemail.io/inline
1010
------------------------------------- */
1111
/* -------------------------------------
1212
RESPONSIVE AND MOBILE FRIENDLY STYLES
1313
------------------------------------- */
1414
@media only screen and (max-width: 620px) {
1515
table[class=body] h1 {
1616
font-size: 28px !important;
17-
margin-bottom: 10px !important; }
17+
margin-bottom: 10px !important;
18+
}
1819
table[class=body] p,
19-
table[class=body] ul,
20-
table[class=body] ol,
21-
table[class=body] td,
22-
table[class=body] span,
23-
table[class=body] a {
24-
font-size: 16px !important; }
20+
table[class=body] ul,
21+
table[class=body] ol,
22+
table[class=body] td,
23+
table[class=body] span,
24+
table[class=body] a {
25+
font-size: 16px !important;
26+
}
2527
table[class=body] .wrapper,
26-
table[class=body] .article {
27-
padding: 10px !important; }
28+
table[class=body] .article {
29+
padding: 10px !important;
30+
}
2831
table[class=body] .content {
29-
padding: 0 !important; }
32+
padding: 0 !important;
33+
}
3034
table[class=body] .container {
3135
padding: 0 !important;
32-
width: 100% !important; }
36+
width: 100% !important;
37+
}
3338
table[class=body] .main {
3439
border-left-width: 0 !important;
3540
border-radius: 0 !important;
36-
border-right-width: 0 !important; }
41+
border-right-width: 0 !important;
42+
}
3743
table[class=body] .btn table {
38-
width: 100% !important; }
44+
width: 100% !important;
45+
}
3946
table[class=body] .btn a {
40-
width: 100% !important; }
47+
width: 100% !important;
48+
}
4149
table[class=body] .img-responsive {
4250
height: auto !important;
4351
max-width: 100% !important;
44-
width: auto !important; }}
52+
width: auto !important;
53+
}
54+
}
55+
4556
/* -------------------------------------
4657
PRESERVE THESE STYLES IN THE HEAD
4758
------------------------------------- */
4859
@media all {
4960
.ExternalClass {
50-
width: 100%; }
61+
width: 100%;
62+
}
5163
.ExternalClass,
52-
.ExternalClass p,
53-
.ExternalClass span,
54-
.ExternalClass font,
55-
.ExternalClass td,
56-
.ExternalClass div {
57-
line-height: 100%; }
64+
.ExternalClass p,
65+
.ExternalClass span,
66+
.ExternalClass font,
67+
.ExternalClass td,
68+
.ExternalClass div {
69+
line-height: 100%;
70+
}
5871
.apple-link a {
5972
color: inherit !important;
6073
font-family: inherit !important;
6174
font-size: inherit !important;
6275
font-weight: inherit !important;
6376
line-height: inherit !important;
64-
text-decoration: none !important; }
77+
text-decoration: none !important;
78+
}
6579
.btn-primary table td:hover {
66-
background-color: #34495e !important; }
80+
background-color: #34495e !important;
81+
}
6782
.btn-primary a:hover {
6883
background-color: #34495e !important;
69-
border-color: #34495e !important; } }
84+
border-color: #34495e !important;
85+
}
86+
}
7087
</style>
7188
</head>
72-
<body class="" style="background-color:#f6f6f6;font-family:sans-serif;-webkit-font-smoothing:antialiased;font-size:14px;line-height:1.4;margin:0;padding:0;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;">
73-
<table border="0" cellpadding="0" cellspacing="0" class="body" style="border-collapse:separate;mso-table-lspace:0pt;mso-table-rspace:0pt;background-color:#f6f6f6;width:100%;">
89+
<body class="" style="background-color: #f6f6f6; font-family: sans-serif; -webkit-font-smoothing: antialiased; font-size: 14px; line-height: 1.4; margin: 0; padding: 0; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;">
90+
<table border="0" cellpadding="0" cellspacing="0" class="body" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%; background-color: #f6f6f6;">
7491
<tr>
75-
<td style="font-family:sans-serif;font-size:14px;vertical-align:top;">&nbsp;</td>
76-
<td class="container" style="font-family:sans-serif;font-size:14px;vertical-align:top;display:block;max-width:580px;padding:10px;width:580px;Margin:0 auto !important;">
77-
<div class="content" style="box-sizing:border-box;display:block;Margin:0 auto;max-width:580px;padding:10px;">
92+
<td style="font-family: sans-serif; font-size: 14px; vertical-align: top;">&nbsp;</td>
93+
<td class="container" style="font-family: sans-serif; font-size: 14px; vertical-align: top; display: block; Margin: 0 auto; max-width: 580px; padding: 10px; width: 580px;">
94+
<div class="content" style="box-sizing: border-box; display: block; Margin: 0 auto; max-width: 580px; padding: 10px;">
95+
7896
<!-- START CENTERED WHITE CONTAINER -->
79-
<span class="preheader" style="color:transparent;display:none;height:0;max-height:0;max-width:0;opacity:0;overflow:hidden;mso-hide:all;visibility:hidden;width:0;">This is preheader text. Some clients will show this text as a preview.</span>
80-
<table class="main" style="border-collapse:separate;mso-table-lspace:0pt;mso-table-rspace:0pt;background:#fff;border-radius:3px;width:100%;">
97+
<span class="preheader" style="color: transparent; display: none; height: 0; max-height: 0; max-width: 0; opacity: 0; overflow: hidden; mso-hide: all; visibility: hidden; width: 0;">This is preheader text. Some clients will show this text as a preview.</span>
98+
<table class="main" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%; background: #ffffff; border-radius: 3px;">
99+
81100
<!-- START MAIN CONTENT AREA -->
82101
<tr>
83-
<td class="wrapper" style="font-family:sans-serif;font-size:14px;vertical-align:top;box-sizing:border-box;padding:20px;">
84-
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse:separate;mso-table-lspace:0pt;mso-table-rspace:0pt;width:100%;">
102+
<td class="wrapper" style="font-family: sans-serif; font-size: 14px; vertical-align: top; box-sizing: border-box; padding: 20px;">
103+
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%;">
85104
<tr>
86-
<td style="font-family:sans-serif;font-size:14px;vertical-align:top;">
87-
<p style="font-family:sans-serif;font-size:14px;font-weight:normal;margin:0;Margin-bottom:15px;">Hi there,</p>
88-
<p style="font-family:sans-serif;font-size:14px;font-weight:normal;margin:0;Margin-bottom:15px;">Sometimes you just want to send a simple HTML email with a simple design and clear call to action. This is it.</p>
89-
<table border="0" cellpadding="0" cellspacing="0" class="btn btn-primary" style="border-collapse:separate;mso-table-lspace:0pt;mso-table-rspace:0pt;box-sizing:border-box;width:100%;">
105+
<td style="font-family: sans-serif; font-size: 14px; vertical-align: top;">
106+
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; Margin-bottom: 15px;">Hi there,</p>
107+
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; Margin-bottom: 15px;">Sometimes you just want to send a simple HTML email with a simple design and clear call to action. This is it.</p>
108+
<table border="0" cellpadding="0" cellspacing="0" class="btn btn-primary" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%; box-sizing: border-box;">
90109
<tbody>
91110
<tr>
92-
<td align="left" style="font-family:sans-serif;font-size:14px;vertical-align:top;padding-bottom:15px;">
93-
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse:separate;mso-table-lspace:0pt;mso-table-rspace:0pt;width:100%;width:auto;">
111+
<td align="left" style="font-family: sans-serif; font-size: 14px; vertical-align: top; padding-bottom: 15px;">
112+
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: auto;">
94113
<tbody>
95114
<tr>
96-
<td style="font-family:sans-serif;font-size:14px;vertical-align:top;background-color:#ffffff;border-radius:5px;text-align:center;background-color:#3498db;"> <a href="http://htmlemail.io" target="_blank" style="text-decoration:underline;background-color:#ffffff;border:solid 1px #3498db;border-radius:5px;box-sizing:border-box;color:#3498db;cursor:pointer;display:inline-block;font-size:14px;font-weight:bold;margin:0;padding:12px 25px;text-decoration:none;text-transform:capitalize;background-color:#3498db;border-color:#3498db;color:#ffffff;">Call To Action</a> </td>
115+
<td style="font-family: sans-serif; font-size: 14px; vertical-align: top; background-color: #3498db; border-radius: 5px; text-align: center;"> <a href="http://htmlemail.io" target="_blank" style="display: inline-block; color: #ffffff; background-color: #3498db; border: solid 1px #3498db; border-radius: 5px; box-sizing: border-box; cursor: pointer; text-decoration: none; font-size: 14px; font-weight: bold; margin: 0; padding: 12px 25px; text-transform: capitalize; border-color: #3498db;">Call To Action</a> </td>
97116
</tr>
98117
</tbody>
99118
</table>
100119
</td>
101120
</tr>
102121
</tbody>
103122
</table>
104-
<p style="font-family:sans-serif;font-size:14px;font-weight:normal;margin:0;Margin-bottom:15px;">This is a really simple email template. Its sole purpose is to get the recipient to click the button with no distractions.</p>
105-
<p style="font-family:sans-serif;font-size:14px;font-weight:normal;margin:0;Margin-bottom:15px;">Good luck! Hope it works.</p>
123+
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; Margin-bottom: 15px;">This is a really simple email template. Its sole purpose is to get the recipient to click the button with no distractions.</p>
124+
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; Margin-bottom: 15px;">Good luck! Hope it works.</p>
106125
</td>
107126
</tr>
108127
</table>
109128
</td>
110129
</tr>
111-
<!-- END MAIN CONTENT AREA -->
130+
131+
<!-- END MAIN CONTENT AREA -->
112132
</table>
133+
113134
<!-- START FOOTER -->
114-
<div class="footer" style="clear:both;padding-top:10px;text-align:center;width:100%;">
115-
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse:separate;mso-table-lspace:0pt;mso-table-rspace:0pt;width:100%;">
135+
<div class="footer" style="clear: both; Margin-top: 10px; text-align: center; width: 100%;">
136+
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%;">
116137
<tr>
117-
<td class="content-block" style="font-family:sans-serif;font-size:14px;vertical-align:top;color:#999999;font-size:12px;text-align:center;">
118-
<span class="apple-link" style="color:#999999;font-size:12px;text-align:center;">Company Inc, 3 Abbey Road, San Francisco CA 94102</span>
119-
<br>
120-
Don't like these emails? <a href="http://i.imgur.com/CScmqnj.gif" style="color:#3498db;text-decoration:underline;color:#999999;font-size:12px;text-align:center;">Unsubscribe</a>.
138+
<td class="content-block" style="font-family: sans-serif; vertical-align: top; padding-bottom: 10px; padding-top: 10px; font-size: 12px; color: #999999; text-align: center;">
139+
<span class="apple-link" style="color: #999999; font-size: 12px; text-align: center;">Company Inc, 3 Abbey Road, San Francisco CA 94102</span>
140+
<br> Don't like these emails? <a href="http://i.imgur.com/CScmqnj.gif" style="text-decoration: underline; color: #999999; font-size: 12px; text-align: center;">Unsubscribe</a>.
121141
</td>
122142
</tr>
123143
<tr>
124-
<td class="content-block powered-by" style="font-family:sans-serif;font-size:14px;vertical-align:top;color:#999999;font-size:12px;text-align:center;">
125-
Powered by <a href="http://htmlemail.io" style="color:#3498db;text-decoration:underline;color:#999999;font-size:12px;text-align:center;text-decoration:none;">HTMLemail</a>.
144+
<td class="content-block powered-by" style="font-family: sans-serif; vertical-align: top; padding-bottom: 10px; padding-top: 10px; font-size: 12px; color: #999999; text-align: center;">
145+
Powered by <a href="http://htmlemail.io" style="color: #999999; font-size: 12px; text-align: center; text-decoration: none;">HTMLemail</a>.
126146
</td>
127147
</tr>
128148
</table>
129149
</div>
130150
<!-- END FOOTER -->
131-
<!-- END CENTERED WHITE CONTAINER -->
151+
152+
<!-- END CENTERED WHITE CONTAINER -->
132153
</div>
133154
</td>
134-
<td style="font-family:sans-serif;font-size:14px;vertical-align:top;">&nbsp;</td>
155+
<td style="font-family: sans-serif; font-size: 14px; vertical-align: top;">&nbsp;</td>
135156
</tr>
136157
</table>
137158
</body>
138-
</html>
159+
</html>

email.html

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
font-size: 14px;
2121
line-height: 1.4;
2222
margin: 0;
23-
padding: 0;
23+
padding: 0;
2424
-ms-text-size-adjust: 100%;
2525
-webkit-text-size-adjust: 100%; }
2626

@@ -63,17 +63,22 @@
6363
HEADER, FOOTER, MAIN
6464
------------------------------------- */
6565
.main {
66-
background: #fff;
66+
background: #ffffff;
6767
border-radius: 3px;
6868
width: 100%; }
6969

7070
.wrapper {
7171
box-sizing: border-box;
7272
padding: 20px; }
7373

74+
.content-block {
75+
padding-bottom: 10px;
76+
padding-top: 10px;
77+
}
78+
7479
.footer {
7580
clear: both;
76-
padding-top: 10px;
81+
Margin-top: 10px;
7782
text-align: center;
7883
width: 100%; }
7984
.footer td,
@@ -260,7 +265,7 @@
260265
font-size: inherit !important;
261266
font-weight: inherit !important;
262267
line-height: inherit !important;
263-
text-decoration: none !important; }
268+
text-decoration: none !important; }
264269
.btn-primary table td:hover {
265270
background-color: #34495e !important; }
266271
.btn-primary a:hover {
@@ -331,7 +336,7 @@
331336
</table>
332337
</div>
333338
<!-- END FOOTER -->
334-
339+
335340
<!-- END CENTERED WHITE CONTAINER -->
336341
</div>
337342
</td>

readme.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
11
# Really Simple Responsive HTML Email Template
22

3-
Sometimes all you want is a really simple responsive HTML email template. Here it is.
3+
Sometimes all you want is a really simple responsive HTML email template. Here it is.
44

55
[See live preview](http://leemunroe.github.io/responsive-html-email-template/email.html).
66

77
<img src="https://cloud.githubusercontent.com/assets/15963/26765586/c6484a96-4933-11e7-80e0-2f7509d24280.png" alt="Simple HTML Email" width="500">
88

99

10-
## Sending emails using a marketing service like Campaign Monitor or Mailchimp?
10+
## Sending emails directly from your codebase or using a developer service?
1111

12-
Use the template `email.html` as is. They'll put the CSS inline for you when you put together your campaign.
12+
For an API service (like Mailgun) **you need to inline the CSS before sending**. See `email-inlined.html` for an example.
1313

14+
You can use CSS inliner tools like [Responsive CSS Inliner](https://htmlemail.io/inline/) or [Juice](https://github.com/Automattic/juice) to do this automatically.
1415

15-
## Sending emails directly from your app or using a developer service?
16+
* Copy all of email.html
17+
* Paste the HTML as the source into the inliner
18+
* Copy the HTML output and use this as the email template you send
1619

17-
For an API like [Mailgun](http://www.mailgun.com) **you need to inline the CSS before sending**. See `email-inlined.html` for an example.
1820

19-
You can use inliner tools like [Responsive CSS Inliner](https://htmlemail.io/inline/) or [Juice](https://github.com/Automattic/juice) to do this automatically.
21+
## Sending emails using a marketing service like Mailchimp?
2022

21-
* Copy all of email.html
22-
* Paste the HTML as the source into Putsmail
23-
* Copy the HTML results and use them in your email template
23+
Use the template `email.html` as is. They'll put the CSS inline for you when you put together your campaign.
2424

2525
## Tried and tested on all major email clients
2626

27-
Tested on mobile, desktop and web.
27+
Tested on mobile, desktop and web.
2828

2929
![Templates Tested on Email Clients](https://cloud.githubusercontent.com/assets/15963/17391543/bc289abe-59cb-11e6-9946-605a85f8c522.jpg)
3030

3131

32-
[See the Litmus test results](https://litmus.com/checklist/emails/public/d432046).
32+
[See the Litmus test results](https://litmus.com/checklist/emails/public/cc3e30f).
3333

3434
## More HTML email resources
3535

3636
* [More Responsive HTML Email Templates](http://htmlemail.io)
37-
* [Things I've Learned About Building HTML Emails](http://www.leemunroe.com/building-html-email/)
37+
* [An Introduction To Building And Sending HTML Email For Web Developers](https://www.smashingmagazine.com/2017/01/introduction-building-sending-html-email-for-web-developers/)
3838
* [Grunt Email Design Workflow](https://github.com/leemunroe/grunt-email-design)

0 commit comments

Comments
 (0)