CSS Dojo道場 · practice
All levels

Margins collapse

Level 8 of 13

Your goal

Make the vertical gap between box A and box B exactly 40px. It is 20px now. Both boxes stay 200 × 50 and A stays at the top, so B's top should be at y = 90.

Elements

Hover one to find it on the stage. Click it, or put your cursor inside its CSS rule, to focus on just that element.

marginborderpaddingcontenttarget content boxtarget outer edge (green = matched, red = not yet)your element (hovered or focused)
Feedback updates as you type, and your CSS is saved in this browser. Exact target numbers are in the Target panel.