Body / background table padding - Outlook 07+

What's the latest work arounds for Outlook 07+ adding padding/margin to the body and table elements?

In style I go with

        .backgroundTable {margin:0 auto; padding:0; width:100%; line-height: 100% !important;}        
        table td {border-collapse: collapse;}
        table { border-collapse:collapse; mso-table-lspace:0pt; mso-table-rspace:0pt; }

 

On the body i've got:

<body bgcolor="E8E9EC" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" style="-webkit-font-smoothing: antialiased;width:100% !important;background:#E8E9EC;-webkit-text-size-adjust:none;"> 

On background tables I run

<table cellpadding="0" cellspacing="0" border="0" class="backgroundTable" bgcolor="E8E9EC">

Yet I'm still finding that there is padding around my background table.

Obviously this can only really shows up when the elements in the body and table are different colours, but it's still annoying.

roshodgekiss roshodgekiss, 2 years ago

Hi carl, this is unusual - however I noticed that the # is omitted from your hex colors, which could be giving the visual impression that there's extra padding (when in fact, a color isn't displaying in a specific cell, or something like that.)

Also, could you kindly double-check if any surrounding elements have the align="" attribute? This can introduce padding from time to time.

The final thing - I wouldn't rely on using CSS for widths etc. Your best bet would be something like:

.backgroundTable {margin:0; padding:0; line-height: 100% !important;} 

...

<body bgcolor="#E8E9EC" topmargin="0" leftmargin="0" rightmargin="0" style="-webkit-font-smoothing: antialiased;-webkit-text-size-adjust:none;">

....

<table width="100%" cellpadding="0" cellspacing="0" border="0" class="backgroundTable" bgcolor="#E8E9EC">

I hope that makes sense - please let us know hows you go :)


Get in touch with us on Twitter: http://twitter.com/campaignmonitor
We're also on Facebook: http://facebook.com/campaignmonitor

Join 200,000 companies around the world that use Campaign Monitor to run email marketing campaigns that deliver results for their business.

Get started for free
1-888-533-8098