【发布时间】:2015-03-21 07:23:48
【问题描述】:
我正在尝试编写包含重叠列的 HTML 电子邮件。用 div 做这个没问题,但需要用表格来做,而且我已经好几年没玩过表格了!
我需要将绿色从顶部移出并在行底部溢出。 蓝色行将具有背景图像,绿色行将是纯色背景色。 我已经尝试在行内嵌套一个新表并使行比背景图像高,但我想知道是否有其他解决方案。
这是我目前拥有的:
<table width="800" border="0" cellspacing="0">
<tr>
<td height="98" colspan="2" style="background-color: #efefef;"></td>
</tr>
<tr height="400" style="background-color: #f0c;">
<td colspan="2">
<table height="400" width="800" border="0" cellspacing="0">
<tr>
<td height="100" colspan="2">Some text here</td>
</tr>
<tr>
<td width="500" height="278"></td>
<td width="300" style="background-color: #0fc;">More text here</td>
</tr>
</table>
</td>
<tr>
<td height="98" colspan="2" style="background-color: #efefef;"></td>
</tr>
</table>
【问题讨论】:
-
您能把您的 HTML 代码发布在一个工作小提琴中吗?
-
当然。这是代码。仍然是空的,但这就是我所拥有的。 jsfiddle.net/mdzvvx3q
标签: html html-table overlay cell overlap