CSS3 box-direction property
Example
Display the child elements of a div box from right to left:
div
{
width:350px;
height:100px;
border:1px solid black;
/* Internet Explorer 10 */
display:-ms-flexbox;
-ms-flex-direction:row-reverse;
/* Firefox */
display:-moz-box;
-moz-box-direction:reverse;
/* Safari, Opera, and Chrome */
display:-webkit-box;
-webkit-box-direction:reverse;
/* W3C */
display:box;
box-direction:reverse;
}
Try it »
Browser support





Currently no major browser supports the box-direction property.
Internet Explorer 10 supports it through the private property -ms-flex-direction.
Firefox supports it through the private property -moz-box-direction.
Safari and Chrome through the private property -webkit-box-direction.
Note: Internet Explorer 9 and earlier versions do not support flexbox.
Property definition and usage
The box-direction property specifies the direction in which the child elements of a box are displayed.
| Default value: | normal |
|---|---|
| Inheritance: | no |
| Version: | CSS3 |
| JavaScript syntax: | object.style.boxDirection="reverse" |
Syntax
box-direction: normal|reverse|inherit;
| Value | Description |
|---|---|
| normal | Display child elements in the default direction. |
| reverse | Display child elements in the reverse direction. |
| inherit | The value of the box-direction property should be inherited from the child elements |