我需要爲電子郵件設置一個HTML表格,其中每列都有一個設置寬度。TD佔用行的整個寬度
左欄只是一個圖像,右面是文字。我已經設置了寬度,但無論如何,td呈現爲600px寬。
電子郵件可以被看作here
下面是代碼
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="description" content="Fitzgerald Description">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>
Fitzgerald Email
</title>
</head>
<body bgcolor="#ffffff" style="margin:0; padding:0; width:100% !important; background-color:#f8f6f2; font-family:Calibri, 'Helvetica Neue', Helvetical, Arial, Geneva, clean, sans-serif;">
<table bgcolor="#ffffff" align="center" border="0" cellpadding="0" cellspacing="0" style="width:600px; max-width:600px; margin:0 auto 0 auto;" width="600">
<tbody>
<tr>
<td align="center" style="text-align:center;" width="600">
<img align="none" alt="Fitzgerald Header" border="0" src="http://i.imgur.com/MLEroOA.jpg" style="width: 600px;" width="600">
</td>
</tr>
<tr>
<td width="244">
<img align="none" alt="Fitzgerald Pictures" border="0" src="http://i.imgur.com/nn93sj7.jpg" style="width:244px;" width="244">
</td>
<td width="356">
<p style="font-size:18px; color:##71032d;">
Going, Going ...
</p>
</td>
</tr>
<tr>
<td align="center" width="600">
<div style="font-size:12px; color:#9d9d9c">
288 Macon Ave. | Asheville, North Carolina 28804 | 828-251-1140 | <a href="thefitzgeraldatgrovepark.com" style="color:#9d9d9c; text-decoration: none">thefitzgeraldatgrovepark.com</a>
</div>
</td>
</tr>
<tr>
<td align="left" width="600">
<p style="font-size:12px; color:#9d9d9c; margin-left:18px; margin-right:18px;">
Sales by Beverly-Hanks & Associates, licensed in North Carolina. This is not an offer to sell to residents of any state or province in which legal requirements have not been fulfilled. This offer is void where prohibited by law. All features, services, amenities, descriptions and other information set forth in this communication are subject to change at any time without notice. The features, services, amenities and other privileges of owners of a Residence at The Fitzgerald are limited to those included in the Purchase Agreement and the Declaration of Condominium for The Fitzgerald Condominium. Certain mandatory dues, assessments, fees and charges apply to Residences at The Fitzgerald in connection with services, features and amenities described herein, contact a Fitzgerald sales professional for details. Depictions include amenities and furniture in the Model Homes which are not included in the sale of a Residence at The Fitzgerald.
</p>
</td>
</tr>
<tr>
<td align="center" width="600" height="10"></td>
</tr>
</tbody>
</table>
</body>
</html>
在我看來,接受的答案是錯誤的。我不會混合表和浮動,他們是兩種不同的方法。在浮動之前,所有的網頁設計都是用表格完成的,這意味着你根本不需要浮動表格來佈置表格。真的,你應該只使用表格來呈現行/列數據,但有時你可能希望表格作爲電子郵件佈局的基本回退方法。儘管目前大多數電子郵件應用程序似乎都處理浮動div。 –