Exercise 9.1

This is Exercise #9.1, lecture on CSS Flexbox, used in the course IDATA2301 Web technologiesat NTNU, campus Aalesund.

Go back to exercise list.

Instructions

Your task is to style a container as a flexbox to get the result described below. Take this file as a template and extend it.

The result should look as follows (from the book):

Flexbox with five colored items: 1, 2, 3, 4, 5

Starter code

Here is the container which you should style:

1
2
3
4
5

Bonus

If you are done with the first part and have some time left, make the flexbox look like this:

Flexbox with five colored items: 5, 4, 3, 2, 1

Solution

Warning! Give the exercise a try before you look at a solution! That way you will learn much more!

You can find a solution here.