Flex CSS


CSS FlexBox Practical Examples (Rebuilding Dribbble.com using FlexBox)

What Is Flexbox?

The CSS3 Flexible Box, or flexbox, is a layout mode providing for the arrangement of elements on a page such that the elements behave predictably when the page layout must accommodate different screen sizes and different display devices. For many applications, the flexible box model provides an improvement over the block model in that it does not use floats, nor do the flex container's margins collapse with the margins of its contents.

—mdn

Default Display

1
2
3
4
5

Display: flex

1
2
3
4
5

row-reverse

1
2
3
4
5

flex-wrap

1
2
3
4
5

justify-content

1
2
3
4
5

align-items

1
2
3
4
5

align-content

1
2
3
4
5

order

1
2
3
4
5

flex-grow

1
2
3
4
5

flex-shrink

1
2
3
4
5

flex-basis

1
2
3
4
5

align-self

1
2
3
4
5