CSS Flexbox


1

2

3

4

5

6

7

8


CSS Flexbox Layout Module

Before Flexbox Layout, there were four different ways to arrange elements on a web page:

  • Block, for sections in a webpage
  • Inline, for text
  • Table, for two-dimensional table data
  • Positioned, for explicit position of an element

The Flexible Box Layout Module simplifies creating flexible and responsive layouts without the need for float or positioning.


Flexbox Elements

To begin using the Flexbox system, you must first create a flex container.

1

2

3

The element shown above is like a box (the blue part) that can arrange three items inside it.

You will learn more about flex containers and flex items in the next chapters.