Home Resources Blog

Uh oh! This fix has unexplainably stopped working. We recommend Email on Acid’s fix instead.

Finally getting atop an annoying email rendering bug gives geeks like us near-endless, t-shirt removing satisfaction. Especially when it’s plaguing our newsletters. In this instance, our adversary was 3px spacing to the left and right of tables with align="" applied to them. The stage was Outlook 2007 and 2010. While this has been a long-running issue, things really came to a head when I was coding our latest email newsletter, only to find that two text boxes nested in a table would not sit alongside each other, thanks to said gaps:

Spacing around table in Outlook 2007

Using align="" to float tables alongside each other is starting to be used as an easy way to convert a regular 2 column email design to a ‘wrapped’ 1 column on mobile devices. We’ll cover how to do this in the blog shortly.

Anyway, after an agonizing hour or so of trying to close the gaps with padding and margin, I scheduled the campaign and walked away in defeat, knowing all too well that our Outlook-using subscribers would see the awkward gaps. Yes, I’d coaxed the boxes to sit beside each other, but it just wasn’t perfect. And anyone who knows how I code email designs knows that not perfect is simply not good enough.

Time passed and things settled down. That’s until a customer contacted us on the forums about the same issue.

Going gap-free

Instantly, my primordial feelings, my white-knuckled combat response returned. “There’s no workaround for this.” I typed. It felt like one of those scenes where the righteous cop hands over his badge and gun, locked in an expression of both impotence and rage.

There was no workaround, until another customer chimed in.

Known only as dedra and slinging a line of Microsoft Office proprietary CSS, he had a near-solution – that is, using mso properties to control spacing between elements. The brain juices started flowing. I started googling around and found the answer tucked away on Emailology, a genuine Aladdin’s cave of email design treasure.
To remove the spacing, simply add the following to your CSS styles…

table { border-collapse:collapse; mso-table-lspace:0pt; mso-table-rspace:0pt; }

… or inline it like so…

...

… and the gaps will be no more. The end result is a great-looking email newsletter:

No gaps in Outlook 2007

Many thanks to Emailology, the mysterious dedra and all our customers on the forums for this fix. We’re now free to create responsive email designs with floating tables, that look just as lovely in Outlook 2007 and 2010, as in any other email client.

This blog provides general information and discussion about email marketing and related subjects. The content provided in this blog ("Content”), should not be construed as and is not intended to constitute financial, legal or tax advice. You should seek the advice of professionals prior to acting upon any information contained in the Content. All Content is provided strictly “as is” and we make no warranty or representation of any kind regarding the Content.
Straight to your inbox

Get the best email and digital marketing content delivered.

Join 250,000 in-the-know marketers and get the latest marketing tips, tactics, and news right in your inbox.

Subscribe

See why 200,000 companies worldwide love Campaign Monitor.

From Australia to Zimbabwe, and everywhere in between, companies count on Campaign Monitor for email campaigns that boost the bottom line.

Get started for free