You are here: Reference > CSS > properties > browser specific extensions > -moz-box-pack

-moz-box-pack property | -webkit-box-pack property

Browser support:
Specifies where child elements of the box are placed when the box is larger than the size of the children.
Only works for box objects. An element is a box object if the display property of the element has the value of -moz-box (-webkit-box) or -moz-inline-box (-webkit-inline-box).
JavaScript page for this property: MozBoxPack | webkitBoxPack. You can find other example(s) there.

Possible values:

 One of the following values: 
Extra space is split equally along each side of the child elements, resulting in the children being placed in the center of the box.
Child elements are placed on the right or bottom edge of the box.
Takes the value of this property from the computed style of the parent element.
Child elements are justified.
Child elements are placed starting from the left or top edge of the box.
Default: start.

Example HTML code 1:

This example illustrates the use of the -moz-box-pack and the -webkit-box-pack properties:
        .packStart {
            border: 2px solid red;
            width: 250px;
            display: -moz-inline-box;
            display: -webkit-inline-box;
            -moz-box-pack: start;
            -webkit-box-pack: start;
        .packEnd {
            border: 2px solid red;
            width: 250px;
            display: -moz-inline-box;
            display: -webkit-inline-box;
            -moz-box-pack: end;
            -webkit-box-pack: end;
        .packCenter {
            border: 2px solid red;
            width: 250px;
            display: -moz-inline-box;
            display: -webkit-inline-box;
            -moz-box-pack: center;
            -webkit-box-pack: center;
    <div class="packStart" >
        box-pack: start.
    <div class="packEnd" >
        box-pack: end.
    <div class="packCenter" >
        box-pack: center.
Did you find this example helpful? yes no

Supported by tags:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content