Outlook在HTML电子邮件中添加空间 [英] Outlook adding space in HTML email
问题描述
我知道这是一个常见问题,我已经搜索了高和低的解决方案。我遇到的一切,我都试过了。如果我还有任何头发,我会把它拉出来。
我有一张有一系列项目符号的表格。这张表的问题是,每当我创建一个新行时,Outlook决定在每行下面添加额外的空格,使我的表看起来比它应该大。
< style type =text / css>
.ExternalClass表,.ExternalClass tr,.ExternalClass td {line-height:100%;}
< / style>
< table width =400align =leftcellpadding =0cellspacing =0border =0>
< tr style =margin:0px; padding:0px;>
< td width =10align =rightvalign =topstyle =border:none; margin:0px; padding:0px;>
< p style =margin:0px; padding:0px;>
& bull;
< / p>
< / td>
< td width =380align =leftvalign =topstyle =border:none; margin:0px; padding:0px;>
< p style =margin:0px; padding:0px;>
项目符号旁边的信息
< / p>
< / td>
< / tr>
< tr style =margin:0px; padding:0px;>
< td width =10align =rightvalign =topstyle =border:none; margin:0px; padding:0px;>
< p style =margin:0px; padding:0px;>
& bull;
< / p>
< / td>
< td width =380align =leftvalign =topstyle =border:none; margin:0px; padding:0px;>
< p style =margin:0px; padding:0px;>
项目符号旁边的信息
< / p>
< / td>
< / tr>
< / table>
我试过的东西没有用:
border-collapse:collapse
display:block $ c
$ b $ p $ display:inline-block
float:left
< p>< / code>标记,邮件客户端并不总是尊重这些风格,他们会自动添加额外的换行符。 如果需要,您可以将< p>
替换为< span>
,如< span>
不附带任何'免费'填充。
I know this is a common problem, I've searched high and low for a solution. Everything I've come across, I've tried. If I had any hair left I would be pulling it out.
I have a table that has a series of bullet points. The problem with this table is that whenever I create a new row, Outlook decides to add extra spacing below each row, making my table look larger than it should be.
<style type="text/css">
.ExternalClass table, .ExternalClass tr, .ExternalClass td {line-height: 100%;}
</style>
<table width="400" align="left" cellpadding="0" cellspacing="0" border="0">
<tr style="margin:0px; padding:0px;">
<td width="10" align="right" valign="top" style="border:none; margin:0px; padding:0px;">
<p style="margin:0px; padding:0px;">
•
</p>
</td>
<td width="380" align="left" valign="top" style="border:none; margin:0px; padding:0px;">
<p style="margin:0px; padding:0px;">
Info next to bullet
</p>
</td>
</tr>
<tr style="margin:0px; padding:0px;">
<td width="10" align="right" valign="top" style="border:none; margin:0px; padding:0px;">
<p style="margin:0px; padding:0px;">
•
</p>
</td>
<td width="380" align="left" valign="top" style="border:none; margin:0px; padding:0px;">
<p style="margin:0px; padding:0px;">
Info next to bullet
</p>
</td>
</tr>
</table>
Things I've tried that did not work:
border-collapse:collapse
display:block
display:inline-block
float:left
Remove the <p>
tags, mail clients don't always respect styling on those and they'll automatically add an extra line break afterwards.
You can replace the <p>
with a <span>
if needs be, as <span>
doesn't come with any 'free' padding.
这篇关于Outlook在HTML电子邮件中添加空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!