I\'m designing an HTML email template, which forces me to use tables. In the code below, I\'m having trouble (1) removing the spacing below the placeholder image and (2) removin
Hi as @andrew mentioned make cellpadding = 0
, you still might have some space as you are using table border=1
.
Put display:block
on the css for the cell, and valign="top"
that should do the trick
I had a similar problem. This helps me across main email clients. Add:
cellpadding="0"
, cellspacing="0"
and border="0"
to tablesborder-collapse: collapse;
to tablespadding: 0; margin: 0;
to each elementfont-size: 0px; line-height: 0px;
to each element which is emptyUsed font-size:0
in parent TD
which has the image.
If you see table class it has border-spacing: 2px; You could override table class in your css and set its border-spacing: 0px!important in table; I did it like
table {
border-collapse: separate;
white-space: normal;
line-height: normal;
font-weight: normal;
font-size: medium;
font-style: normal;
color: -internal-quirk-inherit;
text-align: start;
border-spacing: 0px!important;
font-variant: normal; }
It saved my day.Hope it would be of help. Thanks.