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 mklannApril 4, 2011 |
CSS Padding in Outlook 2007 and 2010For those of you who design and develop HTML emails for Outlook 2007 and 2010, you already know that you are bound by tables and you have very limited CSS support. What you might not realize is that these two email clients convert your code from something legible into a seemingly foreign Microsoft language. One of the more critical conversions that you should be aware of is that Outlook 2007 and 2010 will often move your CSS from div's and headings into nested paragraph and spans. Sometimes, it keeps the outer container, other times it eliminates it entirely. For example this: <h2 style="font-size: 15px; font-weight: bold; margin: 0; padding: 17px 0 0 0;"> <div style="font-size: 15px; font-weight: bold; margin: 0; padding: 17px 0 0 0;"> <p style="font-size: 15px; font-weight: bold; margin: 0; padding: 17px 0 0 0;"> Will get converted to: <style> p <h2 style='margin:0in;margin-bottom:.0001pt'> <div> <p style='margin:0in;margin-bottom:.0001pt'> The ProblemAs you can see, this conversion moved our CSS from its original box element container to an inline SPAN element and the padding was ignored. SolutionsOne work-around is to avoid padding in block element containers and use margins instead. <h2 style="font-size: 15px; font-weight: bold; margin-left: 5px; margin-right: 5px; margin-bottom: 5px;"> Note: I did not include the "margin" nor "margin-top" properties in this example because they are not supported by Hotmail. After extensive testing, we have confirmed that the padding property is supported in TD's. So another fix is to move your padding into the containing TD, for example: <td style="padding: 17px 0 0 0"> |
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!