Debugging CSS — exercises and bug fixes
5 hands-on exercises and 5 find-the-bug challenges for the Debugging CSS 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
Outline an element
easy10 minOutline #wrap in 2px solid red to see its box.
- 2
Outline everything
easy10 minOutline every element in 1px solid magenta.
- 3
Tint a box
easy10 minGive #text a translucent red tint to see its extent.
- 4
Find the overflow
easy10 minOutline #wrap and reveal anything spilling out.
- 5
Debug without moving anything
medium10 minOutline #text in 4px lime but keep its border at zero.
Find the bug(5)
- 1
Fix the outline with no style
easy8 minAn outline needs a style to be drawn.
- 2
Fix the selector that misses most elements
easy8 minThe universal selector is a star.
- 3
Fix the opaque debug tint
easy8 minA debug tint should be translucent so content stays readable.
- 4
Fix the hidden overflow
easy8 minHiding the overflow conceals the very thing being debugged.
- 5
Fix the border used to debug
easy8 minA border changes the layout; use an outline instead.
Ready to write the code?
The editor, the automatic checks and the worked solutions open up with an account.
Open the workspace