Language
日本語
English

Caution

JavaScript is disabled in your browser.
This site uses JavaScript for features such as search.
For the best experience, please enable JavaScript before browsing this site.

CSS Dictionary

  1. Home
  2. CSS Dictionary
  3. direction

direction

Specifies the direction of text flow.

Sample Code

div.test { direction: ltr;}
div.test1 { direction: rtl;}

Available Values

ValueDescription
ltrSpecifies text flow direction from left to right. This 'ltr' is the initial value for Japanese and English locales.
rtlSpecifies text flow direction from right to left. When specifying this value, you also need to set the 'unicode-bidi' property to 'bidi-override'.

Browser Preview

<p style="direction: ltr">This is a p element with 'direction: <span style="color: #f00">ltr</span>' specified.</p>

<p style="direction: rtl; unicode-bidi: bidi-override;">This is a p element with 'direction: <span style="color: #f00">rtl</span>' and 'unicode-bidi: bidi-override' specified.</p>

Browser Support

Chrome Chrome
2+
1 and earlier ×
Firefox Firefox
1+
Safari Safari
1+
Edge Edge
12+
Supported in all versions
IE IE
11
10
9
8
7
6
Opera Opera
9.2+
8 and earlier ×
iOS Safari iOS Safari
1+
Android Android Browser
4.4+
3 and earlier ×
Chrome Android Chrome Android
Latest
Same support as desktop
Firefox Android Firefox Android
Latest
Same support as desktop

※ Version data based on MDN.

Overview

Specifies the direction of text flow.

To make text flow from right to left, you not only need to set the value to 'rtl', but you also need to set the 'unicode-bidi' property to 'bidi-override'.

If you find any errors or copyright issues, please .