Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
You are here: Reference > CSS > properties > browser specific extensions > -moz-box-pack

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

Browser support:
-moz-box-pack:
-webkit-box-pack:
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: 
center
Extra space is split equally along each side of the child elements, resulting in the children being placed in the center of the box.
end
Child elements are placed on the right or bottom edge of the box.
inherit
Takes the value of this property from the computed style of the parent element.
justify
Child elements are justified.
start
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:
<head>
    <style>
        .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;
        }
    </style>
</head>
<body>
    <div class="packStart" >
        box-pack: start.
    </div>
    <div class="packEnd" >
        box-pack: end.
    </div>
    <div class="packCenter" >
        box-pack: center.
    </div>
</body>
Did you find this example helpful? yes no

Supported by tags:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content