CSS Dojo道場 · practice
All levels

Centring inside grid cells

Level 5 of 10

Your goal

Centre each 60 × 60 item inside its 120 × 120 grid cell, leaving 30px of space on every side. Use justify-items and align-items on .grid.

Must usejustify-itemsalign-items
Not allowedmargin
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.

target 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.