CSS direction property
Examples
Setting text direction "right-to-left":
div
{
direction: rtl;
}
try it"
Attribute definitions and instructions
direction attribute specifies the text direction / writing direction.
Defaults: | ltr |
---|
inherit: | yes |
---|
version: | CSS2 |
---|
JavaScript syntax: | object .style.direction = "rtl" |
---|
Browser Support
Figures in the table represent the first browser to support the version number of the property.
Immediately following the digital -webkit-, -ms- or -moz- ago in support of the prefix attribute first browser version number.
Attributes | | | | | |
---|
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 | Provisions should inherit the direction attribute value from the parent element. |
related articles
CSS tutorial: CSS the Text