Outlook 2010 显示表格单元格之间的间距不一致
我正在设计 HTML 新闻通讯,遇到了这个问题:
如您所见,单元格间距为完全不正常:左右列的行之间不应该(也不可能)有空格。我真的不知道罪魁祸首可能是什么,任何想法将不胜感激!
这是相关的源代码:
<table width="740" cellpadding="0" cellspacing="0" border="1">
<tr>
<td colspan="3">
<img src="top.jpg" width="740" height="53">
</td>
</tr>
<tr>
<td colspan="3" height="200" valign="top" id="headerCell">
<img src="header.jpg" width="740" height="200" alt="Headerbild">
</td>
</tr>
<tr>
<td>
L
</td>
<td valign="top" width="600" bgcolor="#ffffff">
CONTENT
</td>
<td>
R
</td>
</tr>
I'm designing an HTML Newsletter and I've run into this problem:
As you can see, the cellspacing is completely out of whack: there shouldn't (and CAN'T) be a space between the rows on the left and right column. I don't really know what the culprit could be, any ideas would be appreciated!
Here's the relevant source code:
<table width="740" cellpadding="0" cellspacing="0" border="1">
<tr>
<td colspan="3">
<img src="top.jpg" width="740" height="53">
</td>
</tr>
<tr>
<td colspan="3" height="200" valign="top" id="headerCell">
<img src="header.jpg" width="740" height="200" alt="Headerbild">
</td>
</tr>
<tr>
<td>
L
</td>
<td valign="top" width="600" bgcolor="#ffffff">
CONTENT
</td>
<td>
R
</td>
</tr>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
HTML 对我来说看起来不错。您是否尝试过消除不必要的空白?这可能是一个可能的原因(另外,请记住伟大的 IE6,它存在空格问题)。
电子邮件客户端中的 HTML 呈现引擎简直可怕。不久前我不得不设计一些时事通讯,这很糟糕。这是不错的提示集合,也许它会一些帮助。
The HTML looks fine to me. Have you tried eliminating the unnecessary whitespace? That could be a possible cause (also, remember the great IE6, which had whitespace issues).
The HTML rendering engines in e-mail clients are just horrible. I've had to design some newsletters a while back and it sucked big time. Here's a nice collection of tips, maybe it'll be of some help.
我终于找到了导致这种间距的原因:中心单元格上设置的
padding-top
导致左右单元格的顶部边缘与中心单元格的内容顶部保持齐平。I finally found out what was causing this spacing: a
padding-top
set on the center cell caused the left and right cells top edge to stay flush with the content-top of the center cell.