这是我的代码段:
<table cellspacing="0" cellpadding="0" border="0" align="center" bgcolor="#ffffff" width="580" class="email-container">
<tr>
<td><a href="https://www.facebook.com/classicstagecompany"><img src="http://classicstage.org/wp-content/uploads/2018/07/Social-Facebook.jpg" width="194" height="50" alt="Follow us on Facebook!" style="display:block"/></a></td>
<td><a href="https://twitter.com/classicstage"><img src="http://classicstage.org/wp-content/uploads/2018/07/Social-Twitter.jpg" width="194" height="50" alt="Follow us on Twittter!" style="display:block"/></a></td>
<td><a href="https://www.instagram.com/classicstage/"><img src="http://classicstage.org/wp-content/uploads/2018/07/Social-Insta.jpg" width="194" height="50" alt="Follow us on Instagram!" style="display:block"/></a></td>
</tr>
<tr>
<td><a href="http://www.classicstage.org"><img src="http://classicstage.org/wp-content/uploads/2018/07/footer.jpg" width="580" height="175" alt="@ClassicStage #CSCCarmenJones, www.classicstage.com, 136 E 13th St New York NY 10003" style="display:block"/></a>
</td>
</tr>
</table>
为什么在Dreamweaver中看起来像这样:
但是在Gmail中是这样的:
答案 0 :(得分:0)
在一个表中,每个表应具有相同的行数,或者可以使用colspan将一个表跨多列。不建议使用colspan,因为不同的电子邮件客户端开始有杯状杯。
表格列中的表格
<table cellspacing="0" cellpadding="0" border="0" align="center" bgcolor="#ffffff" width="580" class="email-container">
<tr>
<td>
<table cellspacing="0" cellpadding="0" border="0" align="center" bgcolor="#ffffff" width="580" class="email-container">
<tr>
<td><a href="https://www.facebook.com/classicstagecompany"><img src="http://classicstage.org/wp-content/uploads/2018/07/Social-Facebook.jpg" width="194" height="50" alt="Follow us on Facebook!" style="display:block"/></a></td>
<td><a href="https://twitter.com/classicstage"><img src="http://classicstage.org/wp-content/uploads/2018/07/Social-Twitter.jpg" width="194" height="50" alt="Follow us on Twittter!" style="display:block"/></a></td>
<td><a href="https://www.instagram.com/classicstage/"><img src="http://classicstage.org/wp-content/uploads/2018/07/Social-Insta.jpg" width="194" height="50" alt="Follow us on Instagram!" style="display:block"/></a></td>
</tr>
</table>
</td>
</tr>
<tr>
<td><a href="http://www.classicstage.org"><img src="http://classicstage.org/wp-content/uploads/2018/07/footer.jpg" width="580" height="175" alt="@ClassicStage #CSCCarmenJones, www.classicstage.com, 136 E 13th St New York NY 10003" style="display:block"/></a>
</td>
</tr>
</table>
colspan方法(供您了解其工作原理)
<table cellspacing="0" cellpadding="0" border="0" align="center" bgcolor="#ffffff" width="580" class="email-container">
<tr>
<td><a href="https://www.facebook.com/classicstagecompany"><img src="http://classicstage.org/wp-content/uploads/2018/07/Social-Facebook.jpg" width="194" height="50" alt="Follow us on Facebook!" style="display:block"/></a></td>
<td><a href="https://twitter.com/classicstage"><img src="http://classicstage.org/wp-content/uploads/2018/07/Social-Twitter.jpg" width="194" height="50" alt="Follow us on Twittter!" style="display:block"/></a></td>
<td><a href="https://www.instagram.com/classicstage/"><img src="http://classicstage.org/wp-content/uploads/2018/07/Social-Insta.jpg" width="194" height="50" alt="Follow us on Instagram!" style="display:block"/></a></td>
</tr>
<tr>
<td colspan="3"><a href="http://www.classicstage.org"><img src="http://classicstage.org/wp-content/uploads/2018/07/footer.jpg" width="580" height="175" alt="@ClassicStage #CSCCarmenJones, www.classicstage.com, 136 E 13th St New York NY 10003" style="display:block"/></a>
</td>
</tr>
</table>
尝试第一个(它将起作用)。
欢呼