Practice ยท 2 of 2
Grid That Fits Itself
Replace fixed column counts with the responsive one-liner: .gallery uses grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) โ as many 180px-minimum columns as fit, each sharing space equally.
Rules:
- Keep display: grid and gap: 1rem.
- Swap the template to the auto-fit form.
Difficulty: beginner
Press Submit to check your solution.
Back to lesson: Practice: CSS Grid โ Practice