direction

The direction property specifies the writing direction.

CSS2

Syntax

direction: ltr | rtl | inherit
Initial: ltr
Applies To: all elements
Inherited: yes
Percentages: NA
Media: visual

Values

direction: value
Value Description
ltr Left-to-right direction
rtl Right-to-left direction

DOM

[window.]document.getElementById("element-id").style.direction = "direction";

Example | ltr

Example | rtl

Example | DOM

External

W3C Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification