1

I have what looks like a 20px margin or padding in a html email in outlook and I can't get rid of it. The same thing is happening in apple mail client except only on the top not on the left. I have set the body margin and padding to be 0. Anyone got any ideas to fix this.

<body bgcolor="#ffffff" style="margin: 0; padding: 0">
<table border="0" cellpadding="0" cellspacing="0" height="489" width="638" align="left"></table>
</body>
Chapsterj
  • 6,483
  • 20
  • 70
  • 124

2 Answers2

0

Is it possible the table itself has a margin and/or padding around it?

Darian Lewin
  • 172
  • 1
  • 9
  • Tried adding margin and padding 0 to the table but still getting that 20px around the entire html email – Chapsterj Sep 27 '12 at 21:01
0

Just like browsers, email clients have default styling for certain elements and default structuring. You may have a <p> that is put in there by default which might have margin pre-applied to it. Try adding a line of css above your <body>

p { margin: 0; }

I haven't tested this, but it seems like it might be possible.

Also, if that doesn't work, here's an answer to the same ? on SO that suggests this can't be overcome. :\

Community
  • 1
  • 1
Scrimothy
  • 2,536
  • 14
  • 23