Name
text-align — NN 4 IE 4 CSS 1
Synopsis
Inherited: Yes
Determines the horizontal alignment of text within an element. This
attribute is inherited, so it can be set for a container to impact
all nested elements, such as a P element within a
DIV element. Values of center,
left, and right are supported
by Navigator 4 and Internet Explorer 4. The value of
justify is not a CSS requirement, and
implementation in Version 4 browsers is spotty (see Notes).
CSS Syntax
text-align: alignmentJavaScript Equivalent
textAlign
Value
One of the four constants: center |
justify | left |
right.
Initial Value
Depends on browser (left in both Navigator 4 and
Internet Explorer 4, but this is not a CSS requirement).
Example
P.rightHand {text-align: right}
BLOCKQUOTE {text-align: center}Applies To
Block-level elements.
Object Model Reference
- IE
[window.]document.all.elementID.style.textAlign
Notes
If you assign the justify value, text is indeed
justified in Navigator 4 for the Macintosh and Internet Explorer 4
for Windows. The value is treated as the left
setting in Navigator 4 for Windows and IE 4 for Macintosh.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access