我与CSS支持不好的HTML客户的战斗,我需要做表格布局的电子邮件模板。我只是不能放置和正确对齐表内表。我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>
使用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>