Grid-like Layout using Float + Clear or Flexbox

Create the following layouts using

Use padding and text-align to center text inside boxes

Use % for box width

Use nth-child() to define colors of each box

Colors used are:

Container 1 (1-column layout)

1
2
3

Container 2 (2-column layout)

1
2
3
4
5
6

Container 3 (3-column layout)

1
2
3
4
5
6
7
8

Container 4 (4-column layout)

1
2
3
4
5