Jur*_*ocs 1 html-table html-email
我正在与 html 客户端对 CSS 的不良支持作斗争,我需要做一个带有表格布局的电子邮件模板。我只是无法在表格中正确放置和对齐表格。我用 valign 等尝试过,但这不起作用......
如何将一张桌子放在另一张桌子的顶部和中间?
为了说明我已经发布了这个小提琴:http : //jsfiddle.net/eabJh/1/
该<td >Another nested table</td>是在中间位置,而不是在顶部,但在中间。
这是我的 html:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<body style="background-color: black">
<table background="http://i3.mirror.co.uk/incoming/article276604.ece/ALTERNATES/s615/tweet-that-ricky-gervais-jibe-at-mongs-pic-twitter-com-rickygervais-132840776.jpg" width="810" border="20" bordercolor="white" style="border-style:solid; border-spacing:0px; border-collapse:collapse">
<tr style="height:400px">
<td>test
<table width="380" cellspacing="0" cellpadding="2" align="center" border="0">
<tr>
<td >Another nested table</td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
</html>
Run Code Online (Sandbox Code Playgroud)
使用valign = "top":
<td valign = "top">test
<table width="380" cellspacing="0" cellpadding="2" align="center" border="0">
<tr>
<td>Another nested table</td>
</tr>
</table>
</td>
Run Code Online (Sandbox Code Playgroud)