[英]100% width table in email with single fixed width cell
我正在构建一个非常简单的HTML电子邮件。 有一张表,其中有一行和一个单元格。 我希望表格的宽度为100%(设置将填充窗口的背景色),并将单元格的宽度定为600px。 问题是它不起作用。 这可能吗? 感谢您提供的帮助,我花了一个小时在互联网上进行搜索,而且距离还很远。
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0" height="100%" bgcolor="#50917b" align="center" >
<tr>
<td valign="top" max-width="600" bgcolor="#999999" >
content test
</td>
</tr>
</table>
</body>
试试这个..外部表是100%,内部嵌套表是600px并与中心对齐。 所以这对您来说应该很好。 :)
<body>
<table class="wrapper" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#50917b" align="center">
<table class="main" cellpadding="0" width="600" cellspacing="0" border="0">
<tr>
<td valign="top" bgcolor="#999999">
content test
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.