删除两个连续段落之间的空格
我正在创建一封 html 电子邮件并在 Mac 版 Entourage 中对其进行测试。如何删除两个连续段落之间的空白。我尝试了以下方法,它适用于除 Gmail 和 Entourage 之外的所有邮件客户端:(
<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>
如有任何帮助,我们将不胜感激
I am creating an html email and testing it in Entourage for Mac. How does one remove the white space between 2 consecutive paragraphs . I tried the following , it works in every mail client except Gmail and Entourage :(
<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>
Any help would be appreaciated
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
一种方法是将“margin-top:-0.5em”添加到第二段样式。
另一种方法是使用
而不是
One way would be to add 'margin-top:-0.5em' to the 2nd paragraph style.
Another would be to use
<DIV> instead of <P>
他们是对的。与浏览器开发不同,电子邮件编码很痛苦,因为您必须使用基本的 HTML 和内联 CSS 来完成所有事情。您甚至无法使用填充,因为大多数版本的 Outlook 都无法识别它。
They are right. Unlike developing for browsers, emails are a pain to code for since you have to use elementary HTML and inline CSS for EVERYTHING. You can't even use padding since most versions of outlook dont recognize it.