-moz-box-orient Redirect 1

Warning: This is a property of the original CSS Flexible Box Layout Module draft, and has been replaced in newer drafts.

See Flexbox for more information.

Summary

The CSS box-orient property specifies whether an element lays out its contents horizontally or vertically. See Flexbox for more about the properties of flexbox elements.

For example, XUL box and hbox elements lay out their contents horizontally by default, but XUL vbox elements lay out their contents vertically by default.

HTML DOM elements lay out their contents along the inline-axis by default. This CSS property will only apply to HTML elements with a CSS display value of box or inline-box.

Syntax

box-orient:         horizontal | vertical | inline-axis | block-axis | inherit      /* As specified */
-moz-box-orient:    horizontal | vertical | inline-axis | block-axis | inherit      /* Mozilla */
-webkit-box-orient: horizontal | vertical | inline-axis | block-axis | inherit      /* WebKit */

Values

horizontal
The box lays out its contents horizontally.
vertical
The box lays out its contents vertically.
inline-axis (HTML)
The box displays its children along the inline axis.
block-axis (HTML)
The box displays its children along the block axis.

The inline and block axes are the writing-mode dependent keywords which, in English, map to horizontal and vertical respectively.

Examples

<!DOCTYPE html>
<html>
  <head>
    <title>CSS box-orient example</title>
    <style>
      div.example {
        display: box;                     /* As specified */
        display: -moz-box;                /* Mozilla */
        display: -webkit-box;             /* WebKit */

        /* Children should be oriented vertically */
        box-orient: horizontal;           /* As specified */
        -moz-box-orient: horizontal;      /* Mozilla */
        -webkit-box-orient: horizontal;   /* WebKit */
      }
    </style>
  </head>
  <body>
    <div class="example">
      <p>I will be to the left of my sibling.</p>
      <p>I will be to the right of my sibling.</p>
    </div>
  </body>
</html>

The box-orient property will cause the above two <p> sections in the example to display in the same line, as shown here:

example.png

Notes

For XUL elements, if the orientation is set using the element's orient attribute, then the style is ignored.

Specifications

Flexible Box Layout Module (W3C Working Draft)

Note: The current state of this specification does not reflect Mozilla's or WebKit's implementation.

Old Flexible Box Layout Module

Note: WebKit and Mozilla's implementations reflect this version of the specification

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support Not supported (Yes) Not supported Not supported Not supported
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support Not supported Not supported (Yes) Not supported Not supported Not supported

See also

box-direction, box-pack, box-align

Document Tags and Contributors

 Contributors to this page: Sheppy
 Last updated by: Sheppy,