如何摆脱表格单元格之间的这个像素空间?

dww*_*n66 1 html html-table html-email

我正在设计一个电子邮件活动,我的要求不支持CSS.不要让我开始.

除了下面提到的表格外,一切正常.角落的部分偏离了桌子的其余部分一个像素,我不能为我的生活弄清楚我在哪里有错误的分号或其他东西.

角落件是相同的15x15图像,根据角落旋转90度.但是你可以看到线条直到边缘,因此图像上没有额外的填充.

一个角落,缩小到3200%

我已经尝试了越来越多<t*属性的各种迭代,在表格,行和单元格级别进行设置,99%的在线搜索引导我进行Q&As关于确保跨度正常工作 - 我认为我的是.当我使用border = 1属性导​​致我不怀疑边界是罪魁祸首时,上限仍然在那里.

我使用4列x 3行,最外面的列和行包含15px X 15px角图像(gif),角落之间的单元格有一个白色背景,1px X 1px gif间隔对齐并拉伸给我角落图像之间的一条线.

中心部分是带有图标的单元格,后跟一个文本单元格.我需要创建5个这些要点的东西; 我添加了第二个空白框,以显示当其中两个相互对接时会发生什么.

任何人对我能看到的内容,我需要添加什么或需要从代码中减去什么都有任何想法?

在此输入图像描述

<html>
 <body style='background:f3f7f8'>
     <table border=0 width=430 style='font-size=12px;cellpadding=0;cellspacing=0;border-collapse:collapse;'>
       <tr>
        <td width=15 height=15><img src="644810_tl.png" width=15 height=15 ></td>
        <td colspan=2 valign="top" style='background:ffffff'><img src="dkgray.gif" width=400 height=2></td>
        <td width=15 height=15><img src="644810_tr.png" width=15 height=15></td>  
       </tr>

       <tr>
        <td style='background=ffffff' align=left><img src="dkgray.gif" width=2 height=100></td>
        <td style='background=ffffff' width=75 align=center valign=center><img src="icon-pdf.gif"></td>
        <td style='background=ffffff' width=325 align=left valign=cener><strong>Lorem Ipsum<br></strong>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc dignissim risus at quam hendrerit aliquet. Nunc et felis elit. Fusce pharetra adipiscing velit vel pharetra. Donec ornare velit sed massa tempor at tempor sem lacinia. Quisque enim nisl, auctor sit amet volutpat eget, porttitor sit amet tortor. Nulla ut sodales magna. Morbi adipiscing est urna, ac gravida erat.</td>
        <td style='background=ffffff' align=right><img src="dkgray.gif" width=2 height=100></td>
       </tr>

       <tr>
        <td width=15 height=15 style='background=ffffff'><img src="644810_bl.png" width=15 height=15></td>
        <td colspan=2 valign="bottom" style='background:ffffff;cellpadding=0;cellspacing=0;border-collapse:collapse'><img src="dkgray.gif" width=400 height=2></td>
        <td width=15 height=15 style='background=ffffff'><img src="644810_br.png" width=15 height=15></td>
       </tr>

       <tr>
        <td width=15 height=15><img src="644810_tl.png" width=15 height=15 ></td>
        <td colspan=2 valign="top" style='background:ffffff'><img src="dkgray.gif" width=400 height=2></td>
        <td width=15 height=15><img src="644810_tr.png" width=15 height=15></td>  
       </tr>

       <tr>
        <td width=15 height=15 style='background=ffffff'><img src="644810_bl.png" width=15 height=15></td>
        <td colspan=2 valign="bottom" style='background:ffffff;cellpadding=0;cellspacing=0;border-collapse:collapse'><img src="dkgray.gif" width=400 height=2></td>
        <td width=15 height=15 style='background=ffffff'><img src="644810_br.png" width=15 height=15></td>
       </tr>
     </table>
   </body>
  </html>
Run Code Online (Sandbox Code Playgroud)

Jon*_*lor 5

使用边框折叠,这会将单元格的边框折叠到一个边框.

table
{
    border-collapse:collapse;
}
Run Code Online (Sandbox Code Playgroud)


Utk*_*nos 5

您正在指定cellpadding和 ,cellspacing就好像它们是 CSS 属性一样。它们不是——它们是table标签上必须存在的属性。

#另外,十六进制颜色参考前面应该有。