CSS Property - Text Align

Value: left | right | center | justify
Initial: UA specific
Applies to: block-level elements
Inherited: yes
Percentage values: N/A

The CSS property "text-align" describes how text is aligned within the element. The actual justification algorithm used is UA and human language dependent.

Example:

p{text-align: left;}

Result: Default Setting: Text Align Left

p{text-align: right;}

Result: Text is aligned right

p{text-align: center;}

Result: Text is aligned in the center of the element

Note that alignments are relative to the width of the element, not the canvas. If "justify" is not supported, the UA will supply a replacement. Typically, this will be "left" for western languages.

CSS1 core: UAs may treat "justify" as "left" or "right", depending on whether the element"s default writing direction is left-to-right or right-to-left, respectively.

Check Out Our Sponsors
Check Out Our Host

ANHosting

Free CSS.com is proud to be hosted by ANHosting.com. US Based Support starting at only 23 cents a day.
Use the coupon code FREECSS for 3 free months of hosting. Click Here »

Bookmarks
RSS Feed    Search

Support Free CSS.com. Sign up for a FREE account with MailChimp. No Credit Card Necessary!