line-height: 1.4em : line height « CSS « HTML / CSS






line-height: 1.4em

   

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http: //www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http: //www.w3.org/1999/xhtml"xml: lang="en"lang="en">
<head>
<title></title>
<style type="text/css">
body {
  margin: 0px;
  padding: 0px;
  background-color: #fff;
}
p {
  font-size: 0.7em;
  line-height: 1.4em;
}


#MainText {
  padding: 10px;
  margin: 5px;
  background-color: #ccc;
  border: 1px solid #fff;
}



</style>
</head>
<body>
<div id="MainText">
<p>this is a test. this is a test. this is a test. this is a test. .</p>
</div>
</body>
</html>

   
    
  








Related examples in the same category

1.'line-height' Example
2.line-height: 1.5
3.line-height: 75%
4.line-height: 1.5;
5.line-height: 1.5em;
6.line-height: 75%;
7.line height:3em
8.Setting line heights
9.Line-height settings
10.line-height:normal;line-height:18px;line-height:1.5em;line-height:1.9ex;
11.line-height:1.5em;
12.Interlinear space
13.Examples of font-size and line-height
14.Set line height to 1em
15.Set line height to 1.5
16.line-height: 150%; assigns 150% of the font-size to line-height.
17.Padding sets apart text to emphasize it and line-height
18.Proportional line heights
19.Different line height with various measurements