I recently wrote an article detailing best practices for HTML email templates and I thought I would add one more item to the list. Conditional comments have saved me to many times for me to remember when building websites but I never thought they could help when building email templates, how wrong could I be.
For those of you that have attempted to implement an email template with a vaguely complex design in Outlook 2007 you will have hit many stumbling blocks with simple CSS attributes such as “background images” and “display”, to name but a few, not supported. Getting these templates as close to the original design as possible in all email clients whilst also offer a slightly degraded, yet more than acceptable version for Outlook 2007, is a very tricky and time consuming business. This is where conditional comments come in to play, as the example shows below:
<!--[if gte mso 9]>
Add your Outlook 2007 specific code here...
<![endif]-->
The above code snippet provides a much needed means to target Outlook 2007 specifically with styles and code to produce the degradation required to allow HTML templates to display correctly in such an awkward email client.
I would say long live conditional comments, however, I think I will take another tact, please please please Microsoft address Outlook’s support for CSS and for pity sake use the IE rendering engine and not MS Words. You have the market leading browser so use it… [Rant ends] ![]()


1 Comment Received
no comment
Leave A Reply