Intrinsic Sizing — exercises and bug fixes
5 hands-on exercises and 5 find-the-bug challenges for the Intrinsic 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
Set a min-content minimum
easy10 minGive #box a min-width of min-content.
- 2
Set a max-content maximum
easy10 minGive #box a max-width of max-content.
- 3
Cap with fit-content
easy10 minGive #box a max-width of fit-content.
- 4
Combine a minimum and a fixed width
easy10 min200px wide but never below min-content.
- 5
Cap the height intrinsically
medium10 minGive #box a max-height of max-content.
Find the bug(5)
- 1
Fix the misspelled keyword
easy8 minThe keyword is min-content.
- 2
Fix min and max confused
easy8 minCapping the width uses max-width.
- 3
Fix the fixed width that should be intrinsic
easy8 minThe cap should follow the content, not a hard number.
- 4
Fix the missing minimum
easy8 minThe box needs a min-content floor as well as its width.
- 5
Fix the wrong axis
easy8 minThe intrinsic cap was applied to width instead of height.
Ready to write the code?
The editor, the automatic checks and the worked solutions open up with an account.
Open the workspace