5
Flexible Box Model Tom Janssens & Stian Didriksen

Flexible Box Model

Embed Size (px)

Citation preview

Page 1: Flexible Box Model

Flexible Box Model

Tom Janssens & Stian Didriksen

Page 2: Flexible Box Model

CSS Flexible Box Layout Module

The children of a box are laid out either:● horizontally● vertically

Unused space can be assigned to:● particular child● distributed among the children

Nest boxes to build layouts:● horizontal inside vertical● vertical inside horizontal

Page 3: Flexible Box Model

What about ...

FloatsWhere we're going, we don't need floats

CalculationsBrowser will do the calculations

Page 4: Flexible Box Model

Properties

New display property:● display: box

8 new properties:● box-orient● box-pack● box-align● box-flex● box-flex-group● box-ordinal-group● box-direction● box-lines

Page 5: Flexible Box Model

Live demo!