This property details how text will be horizontally aligned within the
current element.
Allowed Values
inherit
CSS2
Type: Explicit
Description:
Explicitly sets the value of this property to that of the parent.
left
CSS1 | CSS2
| IE3B1 | N4B2
| O3.5
Type: Explicit
Description:
Left aligns all text in the current element.
right
CSS1 | CSS2
| IE3B1 | N4B2
| O3.5
Type: Explicit
Description:
Right aligns all text in the current element.
center
CSS1 | CSS2
| IE3B1 | N4B2
| O3.5
Type: Explicit
Description:
Center aligns all text in the current element.
justify
CSS1 | CSS2
| IE4B2 | N4B2
| O3.5
Type: Explicit
Description:
Applies double text justification to all text content in the current
element.
[string]
CSS2
Type: Calculated
Description:
Specifies a string around which cells in a table column will align. Only
applies to table cells. If used for other element types, it will be
treated as as "left" or "right" depending on the current language writing
direction ("left" for English.)
Example
Ext/Doc: blockquote {
text-align: justify }
In-Line: <blockquoteSTYLE="text-align: justify">this blockquote
text is double justified</blockquote>
Notes
CSS1 Conformance: The value of "justify" may be
treated by CSS1 conformant browsers as "left" or "right" depending on
the current language writing direction ("left" for English.)
Browser Peculiarities
Internet Explorer
4.0+:
- [Reported elsewhere] Macintosh versions do not support the
"justify" value for this property.
- Specifying alignment for form button widgets (Input
Type=Submit|Reset|Button) and intrinsic controls (Input
Type=Checkbox|Radio) has no effect. Form Text controls (Input
Type="File|Text", Textarea) apply the alignment within the field.
- When applied to the Table element, this property applies to
content within the individual table cells, not the table structure
relative to its containing block.
Netscape
4.x:
- When applied to form fields, the alignment is relative to the
field's containing block.
- When applied to list items, the alignment is applied to the
list item before it.
- When applied to inline/replaced elements, alignment is applied
to the element, along with any non-marked up content before the
element as well. After the element ends, a line-break is applied.
- When applied to the Table element, this property applies to
content within the individual table cells, not the table structure
relative to its containing block.
- When content is given the "justify" value, any 'background-color'
effect is only applied to the word content and normal spacing between
them. Extra justification spacing uses the 'background-color' of
the parent element.
Opera
3.5:
- This property does not apply to form fields
- When applied to the Table element, this property applies to
content within the individual table cells, not the table structure
relative to its containing block.