Difference between revisions of "CSS GUIDE TEXT ALIGN"

From CDOT Wiki
Jump to: navigation, search
 
(No difference)

Latest revision as of 20:23, 14 December 2006

This document is a work in progress and is subject to change.

Summary

The text-align property is used to to describe how contents of a block are horizontally aligned.

Applicability:The text-align property can be used for all CSS elements.
Media Group: Visual
Inherited:Yes

Syntax

TARGET_ELEMENT { text-align: start | end | left | right | center | justify | <string> }  

Legal Values

There are 7 possible values for text-align:

ValueExplanation
startContents are aligned to the start edge of the line box.
endContents are aligned to the end edge of the line box.
leftContents are aligned to the left edge of the line box.
rightContents are aligned to the right edge of the line box.
centerContents are centered within the line box.
justifyText is justified according to the method specified by the 'text-justify' property.
<string>When applied to a table cell, specifies a string on which all cells in its table column that also have a string value for 'text-align' will align.

See usage examples section for more details.

Mozilla Recommended Values

Usage Examples

center { text-align: center } Creates center element that will align contents in center of line box

Notes

The World Wide Web Consortium (W3C) provides a free online CSS validation service.

Specification Conformance

Browser Compatibility

See Also

Back to CSS Index