I was setting up some signatures in HTML which will end up in Outlook. One issue I have is that when inserting a horizontal line, it inserts a large space above and a smaller space below the line. My issue is the very large space above the horizontal line. It's almost the size of a full break
我在HTML中设置了一些签名,最终将在Outlook中签名。我遇到的一个问题是,当插入一条水平线时,它会在线上方插入一个大空间,在线下方插入一个较小的空间。我的问题是水平线上方的空间非常大。这几乎是一个完整休息的大小
<br>
If I manually edit the signature in Outlook by setting the spacing after the text that is just before the horizontal line it's okay, but I can't do this manually for the # of them I need to edit. Here is an example of my issue:
如果我通过在水平线之前的文本之后设置间距来手动编辑Outlook中的签名,那么我可以手动编辑它需要编辑的#。这是我的问题的一个例子:
<html>
<head>
<title>HTML Online Editor Sample</title>
</head>
<body>
<p>
<span style="font-size:12pt;"><span style="font-family: arial, helvetica, sans-serif;"><b>This is a test</b></span></span></p>
<hr style="height: 2px; width: 99%; background-color: #848484" />
<p>
<span style="font-size:10pt;"><span style="font-family: arial, helvetica, sans-serif;"><b>Text under the line</b></span></span></p>
</body>
</html>
Is there a way I can tighten the text before or after the line?
有没有办法可以在线之前或之后收紧文字?
4 个解决方案
#1
6
Paragraph elements <p>
have some natural padding anad marggin so try to add padding: 0 and margin: 0 to them
段落元素
有一些自然的填充和边缘,所以尝试添加填充:0和margin:0
#2
2
The hr
and p
elements have some padding/margins inserted by the by the browser. Add margin: 0;
to remove that.
hr和p元素有一些由浏览器插入的填充/边距。添加保证金:0;删除它。
#3
1
<hr style="height: 2px; width: 99%; margin:0 auto;line-height:2px;background-color: #848484"; border:0 none; />
OR
<hr style="height: 0; width: 99%; line-height:0;border-bottom:2px solid #848484; background:none;" />
#4
0
Always good to start with a reset CSS and take it from there.
总是很好,从重置CSS开始并从那里采取它。
Useful link: http://meyerweb.com/eric/tools/css/reset/
有用的链接:http://meyerweb.com/eric/tools/css/reset/
#1
6
Paragraph elements <p>
have some natural padding anad marggin so try to add padding: 0 and margin: 0 to them
段落元素
有一些自然的填充和边缘,所以尝试添加填充:0和margin:0
#2
2
The hr
and p
elements have some padding/margins inserted by the by the browser. Add margin: 0;
to remove that.
hr和p元素有一些由浏览器插入的填充/边距。添加保证金:0;删除它。
#3
1
<hr style="height: 2px; width: 99%; margin:0 auto;line-height:2px;background-color: #848484"; border:0 none; />
OR
<hr style="height: 0; width: 99%; line-height:0;border-bottom:2px solid #848484; background:none;" />
#4
0
Always good to start with a reset CSS and take it from there.
总是很好,从重置CSS开始并从那里采取它。
Useful link: http://meyerweb.com/eric/tools/css/reset/
有用的链接:http://meyerweb.com/eric/tools/css/reset/