HTML电子邮件 - Firefox中的单元格中的额外填充和PC上的hotmail

Fin*_*nnn 2 html css html-table html-email

我正在尝试设置HTML电子邮件的样式,显然使用表格和内联样式.我正在使用石蕊测试.com

除了2个客户端 - Firefox上的Hotmail和Gmail之外,我得到了相当不错的一致结果.

我在一个单元格中嵌入一个表,这是嵌入式表格的html -

<table border="0" align="center" cellpadding="0" cellspacing="0" style="padding:0px;">  
<tr>
<td colspan="3" valign="bottom" style="font-size:0px; padding:0px; margin:0px; vertical-align:bottom;overflow:hidden; "><img src="/images/promo-border-top.jpg" width="221" height="4"></td>

<td rowspan="4" style="padding-left:20px; ">
<a href=""><img name="template_r8_c2" src="/images/shop-now-eng.png" width="118" height="32" border="0" id="template_r8_c2" alt="shop now" /></a>
</td>
</tr>
<tr>
<td align="left" height="24" style="padding:0px; margin:0px;  height:24px; background-image:url(/images/promo-border-left.jpg);background-repeat:repeat-y; background-position:left; overflow:hidden;" ><img src="/images/promo-border-left.jpg" width="4" height="24"></td>
 <td align="center" valign="middle" height="20" style="padding:0px; height:20px; overflow:hidden; line-height:10px; font-family: arial, helvetica; color: #333333;  font-size:12px margin-bottom:1px;">xxx-xxx-xxx-xxx</td>
 <td align="right" height="24" style="padding:0px; margin:0px;  height:24px; background-image:url(/images/promo-border-right.jpg); background-repeat:repeat-y; background-position:right;"><img src="/images/promo-border-right.jpg" width="4" height="24"></td>
 <tr>
 <td colspan="3" valign="top" style="padding:0px; font-size:0px; margin:0px; height:4px; background-color:yellow;overflow:hidden;"><img src="images/promo-border-bottom.jpg" width="221" height="4"></td>        
  </table>
Run Code Online (Sandbox Code Playgroud)

我在其下面放了两张图片 - 忽略黄色位,这是为了测试而添加的.

这就是它的外观,以及它在大多数客户端的外观

这就是它在hotmail和gmail中的外观

ajm*_*ajm 5

尝试添加display:block到您的图片.GMail喜欢为显示的图像添加一点边距inline,默认情况下.

编辑:根据下面的评论:它看起来像有td一个rowspan4和只有3可能在你的行table.如果你将4改为3怎么办?