PROPERTY: text-align

text-align : left | right | center | justify
 
Compatibility:  IE4+  N4+
Version: Level 1
Inherited: Yes
 
The text-align property aligns a specified selection of text.
 
left
 
The left value is the default. The text will be aligned along its left side.
 
right
 
The right value aligns the text along its right side.
 
center
 
The center value aligns each line of the text in the center with an equal amount of blank (white) space on each side of the line.
 
justify
 
The justify value adds blank (white) space between adjacent words and characters in order to align both the right and left sides of a block of text. The letter-spacing property can override justification.
 
Code:
p.one { text-align:  left; }
p.two { text-align:  center; }
p.three { text-align:  right; }
...
<p class="one">DevGuru</p>
<p class="two">is</p>
<p class="three">great!</p>

 
Output:

DevGuru

is

great!



Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information