Find the Grid Mistake
Find the Mistake Medium
Question
The grid is not working. Find and fix the mistake.
Code
.grid {
grid-template-columns: 1fr 1fr 1fr;
gap: 20px;
}
Hint
Grid needs to be explicitly enabled, just like flexbox.
Explanation
The container is missing 'display: grid'. Without it, grid-template-columns and gap have no effect. Add 'display: grid;' to activate CSS Grid layout. The corrected code should include display: grid; before the grid properties.
Related Resources
Related Lessons
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.