<table cellpadding="0" cellspacing="0" border="0" role="presentation" style="width:600px;">
<tr>
<td class="block" align="left" valign="top" style="padding:10px 0;" width="50%">
<img src="http://via.placeholder.com/300">
</td>
<td class="block" align="left" valign="top" style="padding:10px 0 10px 10px;" width="50%">
<p style="font-family: Helvetica, Arial, sans-serif;font-size:18px;line-height:28px;mso-line-height-rule:exactly;color:#262524;">Somebody once told me the world is gonna roll me. I ain't the sharpest tool in the shed. She was looking kind of dumb with her finger and her thumb in the shape of an "L" on her forehead.</p>
</td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" border="0" role="presentation" style="width:600px;">
<tr>
<td class="bottom" align="left" valign="top" style="padding:10px 0;" width="50%">
<img src="http://via.placeholder.com/300">
</td>
<td class="top" align="left" valign="top" style="padding:10px 0 10px 10px;" width="50%">
<p style="font-family: Helvetica, Arial, sans-serif;font-size:18px;line-height:28px;mso-line-height-rule:exactly;color:#262524;">Well the years start coming and they don't stop coming. Fed to the rules and I hit the ground running. Didn't make sense not to live for fun. Your brain gets smart but your head gets dumb.</p>
</td>
</tr>
</table>
在这种情况下,您将两个 div 与display: inline-block 。 这使您的内容在桌面上彼此相邻,并将它们推送到移动设备上。 您的代码如下所示:
<div style="display:inline-block;vertical-align:top;">
<table cellpadding="0" cellspacing="0" border="0" role="presentation" style="width: 300px;">
<tr>
<td align="left" valign="top">
<img src="http://via.placeholder.com/300">
</td>
</tr>
</table>
</div>
<div style="display:inline-block;vertical-align:top;">
<table cellpadding="0" cellspacing="0" border="0" role="presentation" style="width:300px;">
<tr>
<td align="left" valign="top" style="padding-left: 10px;">
<p style="font-family: Helvetica, Arial, sans-serif;font-size:18px;line-height:28px;mso-line-height-rule:exactly;color:#262524;">So much to do, so much to see, so what's wrong with taking the back streets? You'll never know if you don't go. You'll never shine if you don't glow.</p>
</td>
</tr>
</table>
</div>
然后我们将所有这些都包裹在一个表格单元格中,并将字体大小设置为 0,这样就不会在 div 周围添加额外的空间,并将整个内容对齐表格单元格的中心:
<tr>
<td style="font-size:0;" align="center" valign="top">
<div style="display:inline-block;vertical-align:top;">
<table cellpadding="0" cellspacing="0" border="0" role="presentation" style="width: 300px;">
<tr>
<td align="left" valign="top">
<img src="http://via.placeholder.com/300">
</td>
</tr>
</table>
</div>
<div style="display:inline-block;vertical-align:top;">
<table cellpadding="0" cellspacing="0" border="0" role="presentation" style="width:300px;">
<tr>
<td align="left" valign="top" style="padding-left: 10px;">
<p style="font-family: Helvetica, Arial, sans-serif;font-size:18px;line-height:28px;mso-line-height-rule:exactly;color:#262524;">So much to do, so much to see, so what's wrong with taking the back streets? You'll never know if you don't go. You'll never shine if you don't glow.</p>
</td>
</tr>
</table>
</div>
</td>
</tr>
可是等等! 由于 Outlook 不支持 div,因此您还需要在所有内容周围添加一些幻影表以使其在 Outlook 中工作:
<tr>
<td style="font-size:0;" align="center" valign="top">
<!--[if (gte mso 9)|(IE)]>
<table cellpadding="0" cellspacing="0" border="0" role="presentation" style="width: 100%;">
<tr>
<td valign="top" style="width: 300px;">
<![endif]-->
<div style="display:inline-block;vertical-align:top;">
<table cellpadding="0" cellspacing="0" border="0" role="presentation" style="width: 300px;">
<tr>
<td align="left" valign="top">
<img src="http://via.placeholder.com/300">
</td>
</tr>
</table>
</div>
<!--[if (gte mso 9)|(IE)]>
</td><td valign="top" style="width:300px;">
<![endif]-->
<div style="display:inline-block;vertical-align:top;">
<table cellpadding="0" cellspacing="0" border="0" role="presentation" style="width:300px;">
<tr>
<td align="left" valign="top" style="padding-left: 10px;">
<p style="font-family: Helvetica, Arial, sans-serif;font-size:18px;line-height:28px;mso-line-height-rule:exactly;color:#262524;">So much to do, so much to see, so what's wrong with taking the back streets? You'll never know if you don't go. You'll never shine if you don't glow.</p>
</td>
</tr>
</table>
</div>
<!--[if (gte mso 9)|(IE)]>
</td>
</tr>
</table>
<![endif]-->
</td>
</tr>