This weblog submit was up to date on July 12, 2018. It was final up to date in February 2017 and initially printed in 2013.
With the recognition of cell e mail and so lots of our customers asking about finest practices for responsive emails, we’d like to assist with a free responsive e mail template to get you up and working as quick as attainable.
This template affords three completely different “layouts” that set off based mostly on the width of the display screen. By default, it helps 1-3 columns and as you set off every media question conditional assertion, it converts to a one-column format for simple studying on cell units.
When you have an E mail on Acid subscription, you have already got entry to this template in our Sources part! Merely log in and navigate to the useful resource heart within the left navigation bar.
When you don’t have a subscription, you could find the template right here. Merely enter your e mail and the obtain is free.
When you obtain the template and end customizing it along with your content material, don’t neglect to check the e-mail. Though we’ve examined this design, the smallest code change may break the e-mail. Fortunately, our platform reveals you what your e mail seems like in additional than 70 purchasers and units. Join our free trial and provides it a check at present!
Template Particulars
When growing this template, we researched the most typical gadget dimensions and ran a media question check to determine the gadget widths to focus on.
The breakpoints we’ve chosen for this template are:
- A width lower than 480pxfor the iPhone and smaller smartphones.
- A width between 481px and 640pxfor medium-sized Android units
- A default dimension of 580pxfor tablets, internet, and desktop e mail purchasers
What’s attention-grabbing about these dimensions is that the breakpoint for medium-sized handheld units is larger than the true property your e mail will get in most internet and desktop e mail purchasers. For that cause, the default width for our template is ready to 580px. This dimension is lower than the media question dimensions that we used for medium-sized cell units.
You possibly can mix-and-match every part of this format. Plus, we tried to make the template generic, as your e mail wants will doubtless change over time.
This template has been examined throughout most main e mail purchasers. However don’t take our phrase for it: Check it your self at present with our free, seven-day trial.
How Did We Construct the Responsive Template?
1. Media Queries
Right here’s the complete fashion block:
<fashion kind="textual content/css">
.ReadMsgBody {width: 100%; background-color: #ffffff;}
.ExternalClass {width: 100%; background-color: #ffffff;}
physique {width: 100%; background-color: #ffffff; margin:0; padding:0;}
desk {border-collapse: collapse;}
@media solely display screen and (max-width: 640px) {
physique[yahoo] .deviceWidth {width:440px!essential; padding:0 4px;}
physique[yahoo] .heart {text-align: heart!essential;}
}
@media solely display screen and (max-width: 479px) {
physique[yahoo] .deviceWidth {width:280px!essential; padding:0 4px;}
physique[yahoo] .heart {text-align: heart!essential;}
}
</fashion>
We then used the ‘deviceWidth’ class on all tables and pictures all through. This resets the width for every factor based mostly on the width of the cell gadget. You possibly can add extra media queries in order for you – be at liberty try this weblog submit for extra breakpoint concepts.
2. Floating Parts
The following problem was creating floating components that naturally stack when there’s not sufficient room for them to drift. Floating components for e mail is relatively tough as a result of a number of e mail purchasers don’t assist the ‘float’ property. As a substitute, we used the ‘align’ attribute inside desk components.
For instance:
<desk align=”left”>
Easy sufficient, proper? Sure and no. Utilizing ‘left’ or ‘proper’ align tables in Outlook 2007, 2010, and 2013, leads to additional desk padding. So, we advocate trying out this Outlook padding workaround for getting aligned tables to match up completely. Within the case of this template, we used percentage-based widths for every floating desk and in some cases, we needed to depend on the ‘<p fashion=”mso-table-lspace:0;mso-table-rspace:0; margin:0″>’ repair.
Customise Away!
Be at liberty to customise this template to suit your wants. You possibly can preserve the e-mail quick and candy in your cell readers by hiding some components inside your format utilizing media queries. Each the Android and the iOS assist the show:none property.
Hopefully, it will prevent a while and stress when creating your subsequent responsive e mail!
Don’t Neglect to Check!
We’ve examined this template totally and we belief it, however once you replace it along with your content material, you’ll want to check it once more. The smallest code change can have huge penalties on the earth of e mail. That’s why E mail on Acid affords limitless testing on greater than 70 e mail purchasers and units. Try our free, seven-day trial and begin testing your new template at present.
Notice: This weblog submit is meant for instructional functions. The supplies used, together with however not restricted to, art work, analysis, coding methods, and the general format are to be thought-about ‘spinoff’ and on no account can we intend to infringe on any unknown copyrights. We give our utmost respect to the thousands and thousands of designers and builders who constantly encourage us to study and create.
When you’d wish to acquire rights to make use of any of the fonts that had been included within the art work of our template, they’re obtainable for buy on-line: Hand Gothic, Thirsty Tough, Thirsty Script, Veneer.