Repurpose your Images for Mobile Email |
|
10.19.2011 Get connected with Email on Acid for up-to-date news and information on the subject of email design, development, and testing! |
By Michelle KlannNovember 10, 2010 |
!DOCTYPE - The Black Sheep of HTML Email Design![]() As if email development wasn't already scary enough, it seems as though we are pushed even further into the HTML and CSS dark ages when it comes to the subject of DOCTYPE. After quite a bit of testing over the past year, we've have come to a very clear understanding of the DOCTYPE, it's effect on your layout and how being aware of it can save a lot of time and frustration. First, you can't avoid it. Many email clients strip your DOCTYPE and either impose their own or leave it out entirely. Here is a breakdown:
INTERESTING SIDE NOTE: If you've ever struggled with box model padding issues in IE, just use any DOCTYPE other than: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN>
For example: <!DOCTYPE html> - this doctype will cause all browsers to render your box elements consistantly. Here are some common things that may happen to your email layout after its DOCTYPE has been stripped: Since most email clients use a browser based rendering engine or can be viewed from within a web browser, the following list is broken down by occurrences that happen within web browsers.
Here are some common things that may happen when your email takes on the Hotmail DOCTYPE:
If you have more to add to either of these lists, please feel free to share your comments below! So What's the SOLUTION?Before running an Acid Test and to save time, we recommend that you strip out your DOCTYPE and test your email layout in IE 6, 7, 8, Firefox, Chrome, Safari and Opera. Once you have it looking good in all browsers, add the Hotmail DOCTYPE and run an Acid test using Firefox or Safari. By adding a DOCTYPE when you run your Acid Test, we will be able to validate your HTML before you get your test results. We provide code validation for many reasons, the first is to ensure that our test results are accurate. Secondly, your code will be interpreted within the UI of each of the web based email clients - if you have a stray </div>, that could have a big effect on the way your will email render. INTERESTING SIDE NOTE: The new DOCTYPE for HTML 5 (<!DOCTYPE html>) causes the same image spacing issues as Hotmail!
|
||||||||||
If you haven't signed up yet, give our FREE online Email Test a try. Just drop in your code and we will instantly simulate your email in the most popular email clients!
Get connected with Email on Acid for up-to-date news and information on the subject of email design, development, and testing!
If it comes to it, one final resort could be using different doctypes for different receivers. For self-coded/maintained projects it shouldn't be tough to provide different doctypes per receiver's email address domain.