Search code examples
htmlcsshtml-email

extra white space between tables in html email for gmail client


My code is at

http://jsfiddle.net/user1212/G86KE/4/

The problem is in gmail it leaves an extra white space between 2 tables inside the same cell. I have tried display:block; margin:0; padding:0; line-height:0;

However , it does not seem to go away.

enter image description here

Is there a fix to this?


Solution

  • Styling HTML mails is horrible.

    A few tips:

    border-spacing:0; /*this should fix the spacing problem*/

    You need to apply this to all the tables you are using, so you should include it in a <style> block at the top like so:

    <head>
      <style>
        table {border-spacing: 0;}
      </style>
    </head>
    

    (sorry for the bad formatting, somehow the code refused to show up properly on multiple lines)