3

HTMLでいくつかの署名を設定していましたが、これはOutlookで終了します。私が抱えている問題の1つは、水平線を挿入すると、線の上に大きなスペースが挿入され、下に小さなスペースが挿入されることです。私の問題は、水平線の上の非常に大きなスペースです。ほぼ完全な休憩のサイズです

<br>

水平線の直前のテキストの後の間隔を設定して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>

行の前後にテキストを引き締める方法はありますか?

4

4 に答える 4

8

Paragraph elements <p> have some natural padding anad marggin so try to add padding: 0 and margin: 0 to them

于 2013-02-27T18:39:20.133 に答える
3

The hr and p elements have some padding/margins inserted by the by the browser. Add margin: 0; to remove that.

于 2013-02-27T18:41:55.640 に答える
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;" />

fiddled here

于 2013-02-27T21:02:31.223 に答える
0

Always good to start with a reset CSS and take it from there.

Useful link: http://meyerweb.com/eric/tools/css/reset/

于 2013-02-27T20:17:07.207 に答える