【发布时间】:2020-03-28 10:56:24
【问题描述】:
我对 HTML 非常陌生,并且我已经构建了一个自定义 HTML 电子邮件签名。我希望它看起来像这样:
但是,使用下面的代码,我将彼此相邻分组的三个字符串最终在第一个字符串和后续字符串之间有空格,如下所示
将三个字符串组合在一起而不在元素之间产生间隙的正确方法是什么?
<div class="presentational-container">
<table role="presentation" cellpadding="0" cellspacing="0" border="0"style="background: none;margin: 0;padding: 10px 10px 0;border-width: 1px 0 0 0;border-style: solid;border-color: #F2F2F2;">
<tbody>
<tr class="outer-row" style="padding: 0 12px 0 0;">
<td class="headshot-cell" style="text-decoration: none;vertical-align: middle;width: 72px;padding: 0 6px 0 0;">
<a href="http://www.robertcooper.me">
<img src="https://tetonsports.imagerelay.com/ql/6cde221aa42c4ec8b325b3c0f6235d2e/email-icon-01.png" name="preview-image-url" style="vertical-align: middle;width:72px"/>
</a>
</td>
<td class="description-cell">
<table role="presentation">
<tbody>
<tr>
<td colspan="2" class="company" style="font-weight: normal;color: #000001;font-size: 14px;font-family: Helvetica, Geneva, sans-serif;">TETON Sports</td>
</tr>
<tr>
<div>
<td colspan="2" class="name" style="font-weight: bold;color: #000001;font-size: 14px;font-family: Helvetica, Geneva, sans-serif;">Josh Jorgensen</td>
<td colspan="2" class="divider" style="font-weight: bold;color: #FF9E18;font-size: 14px;font-family: Helvetica, Geneva, sans-serif;">//</td>
<td colspan="2" class="title" style="font-style: italic;font-weight: normal;color: #54565A;font-size: 14px;font-family: Helvetica, Geneva, sans-serif;">Photographer</td>
</div>
</tr>
<tr>
<td valign="top" class="website" style="font-style: italic;font-weight: normal;color: #54565A;font-size: 14px;font-family: Helvetica, Geneva, sans-serif;">
<a href="josh@tetonsports.com">josh@tetonsports.com</a>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
【问题讨论】:
-
不是空格,只是“评论”在相邻列。我可能会将整个文本字符串设置为单个
td列,并且可能使用span单独设置文本样式
标签: html html-table html-email