Easy Tutorial
❮ Css3 Pr Column Width Sel First Of Type ❯

CSS3 box-align Property

Example

Aligning child elements in a div using both box-align and box-pack properties:


Browser Support

Currently, all major browsers do not support the box-align property.

Internet Explorer 10 supports it through the private property -ms-flex-align.

Firefox supports it through the private property -moz-box-align.

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

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


Property Definition and Usage

The box-align property specifies how child elements of a box are aligned.

Default value: stretch
Inherited: no
--- ---
Version: CSS3
--- ---
JavaScript syntax: object.style.boxAlign="center"
--- ---

Syntax

Value Description
start For normally oriented boxes, the top edge of each child element is placed along the top of the box. For reverse boxes, the bottom edge of each child element is placed along the bottom of the box.
end For normally oriented boxes, the top edge of each child element is placed along the bottom of the box. For reverse boxes, the bottom edge of each child element is placed along the top of the box.
center Any excess space is divided evenly, with half above the child elements and the remaining half below.
baseline If box-orient
stretch Child elements are stretched to fill the containing block.

Online Example

Change an element's box alignment value

❮ Css3 Pr Column Width Sel First Of Type ❯