'line-height' Example : line height « CSS « HTML / CSS

Home
HTML / CSS
1.CSS
2.CSS Controls
3.Form
4.IE Firefox
5.Layout
6.Marquee Attributes
7.Meta Tags
8.Microsoft Attributes
9.Object
10.Reference
11.Style Basics
12.Tags
13.Templates
14.XML
HTML / CSS » CSS » line height 




'line-height' Example
  
    
<html>
<body>
<p id="myP" style="background-color:#EEEEEE">
This is the first line if a sample text.
<br>And this is its second line.
</p>
<input type="button" 
       value="Set lineHeight to 30px" 
       onclick="myP.style.lineHeight='30px'">
       
<input type="button" 
       value="Restore line height to normal" 
       onclick="myP.style.lineHeight='normal'">
</body>
</html>

    
      
        
    
  














Related examples in the same category
1.line-height: 1.5
2.line-height: 1.4em
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
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.