September 13, 2013

HTML Email Rendering Issue with Outlook 2013

Designing HTML emails for Outlook has always been a challenge given that Outlook uses the Microsoft Word rendering engine to display its emails. I always knew to follow the basics, such as avoid background images and CSS positioning such as float, margin and padding. As cluttered as the code looked, nested tables became my friend. This doesn’t seem so bad, right? These simple tips kept my emails rendering properly throughout the Outlook 2007 and 2010 updates.

Unfortunately the release of 2013 was not as kind. Although the rendering is very similar to past updates, I was faced with an unexpected and unpleasant spacing issue between images that my usual “display: block” was not going to fix.

Every table cell previewed in Outlook 2013 contains a line height defined by Outlook. Therefore empty table cells and cells containing images smaller than roughly 15 pixels display a minimum height of 15 pixels regardless of what the cell’s height attribute is set to. This can cause white gaps between images in your email.

Luckily there is a fix. The issue can be solved by declaring a height and line-height to the table cell where that height equals the image height contained within that cell. The new code would look something like this:

<td style=”height: 12px; line-height: 12px;”><img src=”../image.jpg” style=”display: block;” width=”600″ height=”12″ /></td>

Although I am grateful to have found a fix for this particular issue, I have to admit I dream of the day where all HTML emails render the same no matter which email client or ISP. Something tells me that probably will not be anytime soon. Until then, I continue to build my library of helpful hints as new versions of both email clients and ISPs continue to be released.

Subscribe to our Newsletter

Stay informed on the latest technology news and trends

Relevant Insights

Should You Disrupt Yourself to Accelerate Digital Transformation?

It has been interesting to watch Microsoft transition from a company that makes its money via licensing to one that...

Cybersecurity Myth Busted: Tools Are the Solution

When thinking about security, people often gravitate towards implementing various security tools, solutions, or products. If you bring up a...

Time to Reconsider MP-BGP EVPN for Your Datacenter Network?

VxLAN was defined in 2014 by RFC 7348 and has been used as a component in several SDN (software defined...
X