CSS3 box-directionProperty


Example

From right to left, display the child elements of a div box:

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 Yourself »

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Currently, mainstream browsers do not support the box-direction property.

Internet Explorer 10 provides support via the private property -ms-flex-direction.

Firefox supports this through the private property -moz-box-direction.

Safari and Chrome support it through the private property -webkit-box-direction.

Note:Internet Explorer 9 and earlier versions do not support flexbox.


Property definition and usage instructions

The box-direction property specifies in which direction 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 Displays child elements in the default direction.
reverse Displays child elements in the reverse direction.
inherit The value of the box-direction property should be inherited from the parent element.
other extensions