Html 删除Outlook 2010中的表格单元格间距
希望在HTML电子邮件中使用项目符号列表中的表。下面的代码在除Outlook 2010和2013之外的所有客户端中都运行良好 我们使用行高和其他CSS来删除所有单元格间距。但是,在Outlook 2010中,将忽略行高声明,并显示默认(增加的)间距 有人知道有没有CSS解决方案可以让Outlook尊重线条高度吗Html 删除Outlook 2010中的表格单元格间距,html,css,html-email,outlook-2010,Html,Css,Html Email,Outlook 2010,希望在HTML电子邮件中使用项目符号列表中的表。下面的代码在除Outlook 2010和2013之外的所有客户端中都运行良好 我们使用行高和其他CSS来删除所有单元格间距。但是,在Outlook 2010中,将忽略行高声明,并显示默认(增加的)间距 有人知道有没有CSS解决方案可以让Outlook尊重线条高度吗 <table style="border-collapse:collapse; padding-bottom: 0px; margin: 0px; padding-left: 0p
<table style="border-collapse:collapse; padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; font-family: 'trebuchet ms', arial, helvetica, sans-serif; font-size: 13px; padding-top: 0px;" border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td align="right" valign="top" style="padding-left: 18px; margin: 0px; width: 16px; font-family: 'trebuchet ms', arial, helvetica, sans-serif; padding-bottom: 0px;"><span style="font-size:16px; line-height: 18px;">•</span></td>
<td style="padding-left: 14px; font-family: 'trebuchet ms', arial, helvetica, sans-serif; color: #400400; padding-bottom: 0px; margin: 0px; line-height: 18px;">A</td>
</tr>
<tr>
<td align="right" valign="top" style="padding-left: 18px; margin: 0px; width: 16px; font-family: 'trebuchet ms', arial, helvetica, sans-serif;"><span style="font-size:16px; line-height: 18px;">•</span></td>
<td style="padding-left: 14px; font-family: 'trebuchet ms', arial, helvetica, sans-serif; color: #400400; margin: 0px; line-height: 18px;">B</td>
</tr>
<tr>
<td align="right" valign="top" style="padding-left: 18px; width: 16px; font-family: 'trebuchet ms', arial, helvetica, sans-serif; margin: 0px;"><span style="font-size:16px; line-height: 18px;">•</span></td>
<td style="padding-left: 14px; font-family: 'trebuchet ms', arial, helvetica, sans-serif; color: #400400; margin: 0px; line-height: 18px;">C</td>
</tr>
</tbody>
</table>
&公牛;
A.
&公牛;
B
&公牛;
C
解决方案
一般来说,这不是定制列表中项目符号大小的合理方法,因为Outlook 2007及更高版本(如下所述)中存在副作用。然而,在这种特殊情况下,对项目符号字符使用Arial而不是投石机MS可能是一个适当的解决方案
<table style="font-family: 'trebuchet ms', arial, helvetica, sans-serif; font-size: 13px;" border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td width="16" height="18" align="right" valign="top" style="padding-left: 18px; font-family: arial, helvetica, sans-serif; background-color: #77ddaa;"><span style="font-size:16px; line-height: 18px;">•</span></td>
<td style="padding-left: 14px; font-family: 'trebuchet ms', arial, helvetica, sans-serif; color: #400400; font-size:13px; line-height: 18px; background-color: #77aadd;">A</td>
</tr>
<tr>
<td width="16" height="18" align="right" valign="top" style="padding-left: 18px; font-family: arial, helvetica, sans-serif; background-color: #77ddaa;"><span style="font-size:16px; line-height: 18px;">•</span></td>
<td style="padding-left: 14px; font-family: 'trebuchet ms', arial, helvetica, sans-serif; color: #400400; font-size:13px; line-height: 18px; background-color: #77aadd;">B</td>
</tr>
<tr>
<td width="16" height="18" align="right" valign="top" style="padding-left: 18px; font-family: arial, helvetica, sans-serif; margin: 0px; background-color: #77ddaa;"><span style="font-size:16px; line-height: 18px;">•</span></td>
<td style="padding-left: 14px; font-family: 'trebuchet ms', arial, helvetica, sans-serif; color: #400400; font-size:13px; line-height: 18px; background-color: #77aadd;">C</td>
</tr>
</tbody>
</table>
投石机
相关信息
对于HTML表格,使用HTML属性而不是CSS样式指定宽度和高度。Outlook的现代版本忽略了宽度
和高度
样式
在某些情况下,向表格单元格添加行高
样式(以及可能的HTML高度
属性)将有助于强制执行所需的行高
.解决方案 一般来说,这不是定制列表中项目符号大小的合理方法,因为Outlook 2007及更高版本(如下所述)中存在副作用。然而,在这种特殊情况下,对项目符号字符使用Arial而不是投石机MS可能是一个适当的解决方案
<table style="font-family: 'trebuchet ms', arial, helvetica, sans-serif; font-size: 13px;" border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td width="16" height="18" align="right" valign="top" style="padding-left: 18px; font-family: arial, helvetica, sans-serif; background-color: #77ddaa;"><span style="font-size:16px; line-height: 18px;">•</span></td>
<td style="padding-left: 14px; font-family: 'trebuchet ms', arial, helvetica, sans-serif; color: #400400; font-size:13px; line-height: 18px; background-color: #77aadd;">A</td>
</tr>
<tr>
<td width="16" height="18" align="right" valign="top" style="padding-left: 18px; font-family: arial, helvetica, sans-serif; background-color: #77ddaa;"><span style="font-size:16px; line-height: 18px;">•</span></td>
<td style="padding-left: 14px; font-family: 'trebuchet ms', arial, helvetica, sans-serif; color: #400400; font-size:13px; line-height: 18px; background-color: #77aadd;">B</td>
</tr>
<tr>
<td width="16" height="18" align="right" valign="top" style="padding-left: 18px; font-family: arial, helvetica, sans-serif; margin: 0px; background-color: #77ddaa;"><span style="font-size:16px; line-height: 18px;">•</span></td>
<td style="padding-left: 14px; font-family: 'trebuchet ms', arial, helvetica, sans-serif; color: #400400; font-size:13px; line-height: 18px; background-color: #77aadd;">C</td>
</tr>
</tbody>
</table>
投石机
相关信息
对于HTML表格,使用HTML属性而不是CSS样式指定宽度和高度。Outlook的现代版本忽略了宽度
和高度
样式
在某些情况下,向表格单元格添加行高
样式(以及可能的HTML高度
属性)将有助于强制执行所需的行高
.您无法在outlook中使用
行高。但是,您可以做的是将表拆分为相应的列,这意味着不需要使用&bull代码>在span
中。而不是创建一个能容纳&bull代码>。您可以在那里使用表格属性v-align:top/middle/bottom
以正确排列列表项。这样就不需要使用行高
属性 您无法在outlook中获得行高
。但是,您可以做的是将表拆分为相应的列,这意味着不需要使用&bull代码>在span
中。而不是创建一个能容纳&bull代码>。您可以在那里使用表格属性v-align:top/middle/bottom
以正确排列列表项。这样就不需要使用行高
属性 愚蠢的问题,但为什么不直接使用
?会导致其他问题,例如在Outlook中无法轻松实现项目符号大小,因为列表样式类型不起作用。对项目符号字符使用Arial而不是Trebuchet将有助于降低行高,在这种特殊情况下可能是一个适当的解决方案(如下面更新的答案所述)。愚蠢的问题,但为什么不直接使用
?会导致其他问题,例如在Outlook中无法轻松实现项目符号大小,因为列表样式类型不起作用。对项目符号字符使用Arial而不是Trebuchet将有助于降低行高,在这种特殊情况下,这可能是一个适当的解决方案(如下面更新的答案所述)。
font-size minimum line-height difference
10 15 +5
11 16 +5
12 18 +6
16 22 +6
20 26 +6
30 38 +8
60 76 +16