2011-05-19 54 views
0

我正在创建一个html电子邮件并在Entourage for Mac中进行测试。如何删除2个连续段落之间的空白区域。我尝试以下,它工作在每一个邮件客户端的Gmail,除了和Entourage :(删除2个连续段落之间的空格

<p style="color:#333333; line-height: 20px; font-size: 16px; 
      font-family: Helvetica, Arial, sans-serif; font-weight:bold; 
      margin:0; padding:0; margin-top: 1cm; text-align: left;"> 
Exhibit Space Sales are Open to All</p> 
<p style="color:#767676; line-height: 20px; font-size: 12px; 
      font-family: Helvetica, Arial, sans-serif; text-align: left; 
      margin-bottom: 1cm; padding:0;">Lorem Ipsum is simply dummy 
text of the printing and typesetting industry. Lorem Ipsum has been the 
industry's standard dummy text ever since the 1500s, when an unknown printer 
took a galley of type and scrambled it to make a type specimen book. It has 
survived not only five centuries</p> 

任何帮助将appreaciated

+0

如果您尝试在底部段落的顶部段落和'margin-top:0'上明确设置'margin-bottom:0',会发生什么?什么都没有发生? – 2011-05-20 00:42:55

+0

你为什么用CM作为你的测量?为什么不是PX? – breezy 2011-05-20 15:05:24

回答

0

一种方法是添加“的margin-top:-0.5em”到第二个段落样式。

另一个办法是使用<DIV> instead of <P>

+0

我不能使用div,因为它的HTML电子邮件。因此,最佳实践决定使用表格而不是div:( – user1212 2011-05-20 00:11:08

+1

@ user121最后一句话有太多错误 – DavidJCobb 2011-05-20 00:16:15

+0

我正在尝试仅使用表格和段落创建它,因此我有两段之间的空间问题。我可以使用p {padding:0; margin:0;}去除空间,但在这种情况下,我不能包含margin-top和margin-bottom属性,当我包含它们时,空间会在2第 – user1212 2011-05-20 00:20:41

0

他们是正确的。不像浏览器的发展,电子邮件是一种痛苦的,因为你必须使用一切基本的HTML和内嵌CSS的代码。你可以用”大多数情况下甚至使用填充outlook版本不认识它。