Changes

Jump to: navigation, search

CSS GUIDE DIRECTION

1,663 bytes added, 17:18, 13 December 2006
no edit summary
== Summary ==

The '''direction''' property should be set to match the direction of the text: ''rtl'' for Hebrew or Arabic text and ''ltr'' for other scripts. This should normally be done as part of the document (e.g., using the ''dir'' attribute in HTML) rather than through direct use of CSS.

The property sets the base text direction of block-level elements and the direction of embeddings created by the '''unicode-bidi''' property. It also sets the default alignment of text and block-level elements and the direction that cells flow within a table row.

* Initial value: ltr
* Applies to: all elements
* Inherited: yes
* Percentages: n/a
* Media: visual

== Syntax ==

<pre>
direction: [ 'ltr' | 'rtl' | inherit ] ;
</pre>

== Legal Values ==

'''ltr'''
* The default value of direction. Text and other elements go from left to right

'''rtl'''
* Text and other elements go from right to left

Note: For the '''direction''' property to have any effect on inline-level elements, the '''unicode-bidi''' property's value must be 'embed' or 'override'.

== Mozilla Recommended Values ==

== Usage Examples ==

<pre>
blockquote {
direction : rtl ;
}
</pre>

== Notes ==

Unlike the '''dir''' attribute in HTML, the '''direction''' property is not inherited from table columns into table cells, since CSS inheritance follows the document tree, and table cells are inside of the rows but not inside of the columns.

== Specification Conformance ==

* [http://www.w3.org/TR/CSS21/visuren.html#direction CSS 2.1]
* [http://www.w3.org/TR/2003/CR-css3-text-20030514/#direction CSS 3 Text Module]

== Browser Compatibility ==

== See Also ==

'''unicode-bidi'''
1
edit

Navigation menu