CSS directionProperty


Example

Set text direction to "right-to-left":

div{ direction:rtl; unicode-bidi: bidi-override; }

Try it Yourself »

Attribute definition and usage instructions

The direction attribute specifies the text direction/writing direction.

Default value: ltr
Inherited: yes
version: CSS2
JavaScript Syntax: object.style.direction="rtl"


Browser Support

The numbers in the table indicate the first browser version number that supports this property.

The number immediately preceding -webkit-, -ms-, or -moz- is the first browser version number that supports the prefixed property.

Property
direction  2.0 5.5 1.0 1.3 9.2

Property value

Value Description
ltr Default. Text direction from left to right.
rtl Text direction from right to left.
inherit Specifies that the value of the direction property should be inherited from the parent element.


Related Articles

CSS Tutorial:CSS Text

other extensions