Flex Item Sizing — exercises and bug fixes
5 hands-on exercises and 5 find-the-bug challenges for the Flex Item Sizing lesson. Every one is checked automatically in the browser — write the code, run it, and the tests tell you what still fails.
Exercises(5)
- 1
Let items grow
easy10 minGive every item a flex-grow of 1.
- 2
Stop an item shrinking
easy10 minSet flex-shrink to 0 on the items.
- 3
Set a flex basis
easy10 minGive items a 120px basis.
- 4
Reorder an item
easy10 minGive the items an order of 2.
- 5
Align one item differently
medium10 minUse align-self to push the items to the end.
Find the bug(5)
- 1
Fix flex-grow spelled wrong
easy8 minThe property is flex-grow.
- 2
Fix grow used where shrink was meant
easy8 minPreventing shrinkage uses flex-shrink: 0.
- 3
Fix the missing unit on the basis
easy8 minflex-basis needs a unit.
- 4
Fix align-items used on an item
easy8 minAn individual item uses align-self.
- 5
Fix the order set on the container
easy8 minorder applies to flex items, not the container.
Ready to write the code?
The editor, the automatic checks and the worked solutions open up with an account.
Open the workspace