Reduce the space between lines of text

I am creating a webpage (first time) and I am following as many CSS rules and tags as possible. However, I ran into a space problem. I emphasized the first line of text, but now the second line seems to have drifted below. Is there a way to make it a little more comfortable, I would like the second line of text to be just below the specified line.

body,td,th {
    color: #000000;
}

body { 
 margin: 0; 
 padding: 0; 
 padding-top: 6px;
 text-align: center;
 background-color: #FFFFFF; 
} 
#centered
{ 
 width: 800px; /* set to desired width in px or percent */
 text-align: left; /* optionally you could use "justified" */
 border: 0px; /* Changing this value will add lines around the centered area */
 padding: 0;  
 margin: 0 auto; 
} 
.style3 {
    font-size: 32pt;
    color: #666666;
    margin-left: 0px;   
    border-bottom: 3px double;
}
.style5 {
    margin-left: 390px;
    font-size: 32pt;
    color: #CCCCCC;

}
-->

</style></head>

<div id="centered">


<body>
<p class="style3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;FIRST LINE OF TEXT</p>
<p class="style5">INDENTED SECOND LINE</p>
</body>
</div>
</body>
</html>
+3
source share
4 answers
p.style3, p.style5 {
    margin-top: 2px;
    margin-bottom: 2px;
}

Play with these two values ​​until you get the result :)

+5
source

You need to customize line-height. In particular, add the following declaration:

.style5 {
    line-height: 0.72em;
}

If you want the first row to .style5be dense, you need to adjust the top margin. Use this declaration instead:

.style5 {
    margin-top: -10px;
}

. fiddle.

. , W3C css W3C CSS. , .

+5

. . , body OUTSIDE.

.

: p {line-height:0.7em}, 7/10.

paragrapsh, | . p{margin:0 91px 0 37px;padding:0 43px 0 19px}

+1

All Articles