CSS3 box-orient property
Example
Specify that the child elements of a div element are arranged horizontally:
div
{
width:350px;
height:100px;
border:1px solid black;
/* Firefox */
display:-moz-box;
-moz-box-orient:horizontal;
/* Safari, Opera, and Chrome */
display:-webkit-box;
-webkit-box-orient:horizontal;
/* W3C */
display:box;
box-orient:horizontal;
}
Try it »
Browser support





Currently no major browser supports the box-orient property.
Firefox supports it through the private property -moz-box-orient.
Safari, Opera, and Chrome support it through the private property -webkit-box-orient.
Property definition and usage
The box-orient property specifies whether the child elements of a box should be arranged horizontally or vertically.
Tip: Child elements in a horizontal box are displayed from left to right, and those in a vertical box are displayed from top to bottom. However,box-directionthe direction can be changed by the box-ordinal-groupproperty.
| Default value: | inline-axis |
|---|---|
| Inherited: | no |
| Version: | CSS3 |
| JavaScript syntax: | object.style.boxOrient="vertical" |
Syntax
box-orient: horizontal|vertical|inline-axis|block-axis|inherit;
| Value | Description |
|---|---|
| horizontal | Specify that child elements are arranged from left to right on a horizontal line |
| vertical | Arrange child elements vertically from top to bottom |
| inline-axis | Child elements along the inline axis (mapped to horizontal) |
| block-axis | Child elements along the block axis (mapped to vertical) |
| inherit | The value of the box-orient property should be inherited from the parent element |