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.
Is there a fix to this?
Using the <br> tag is the simplest way to add space in the email content when coded using HTML in email. This method can be used only to create spacing between the texts in the copy of an email and hence it is not used much. <br> tag can be used before and after the content.
If you add margin or HTML email padding properties to your <table> element, it will add that same margin and padding to every nested <td> in Outlook 2007 and 2016. Cellpadding and cellspacing attributes are safe but it's best to avoid CSS margins and padding within the containing <table> element.
Padding is referred to space within the border of an element. It represents the space in pixels, between the cell wall of the table data, <td>, and the content inside.
Using style="display:block" in the image tag should work. Also, don't forget to add it to the spacer image if you're using that.
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)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With