Wireless Headphones
$79
{
"$schema": "../schemas/code-crispies-module-schema.json",
"id": "grid",
"title": "CSS Grid",
"description": "Master the grid layout system for complex two-dimensional layouts",
"difficulty": "intermediate",
"lessons": [
{
"id": "grid-1",
"title": "Grid Container",
"description": "CSS Grid is a two-dimensional layout system, meaning it can handle both columns AND rows simultaneously. While Flexbox excels at one-dimensional layouts (a single row or column), Grid shines when you need precise control over both dimensions—like photo galleries, dashboards, or page layouts.
How it works: Set display: grid on a container, then define columns with grid-template-columns. The fr unit represents a fraction of available space—1fr 1fr 1fr creates three equal columns.
Key properties:
• grid-template-columns – Defines column sizes
• repeat(3, 1fr) – Shorthand for 3 equal columns
• gap – Adds spacing between grid cells
.gallery {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n gap: 1rem;\n}",
"task": "This photo gallery displays images in a single column. Add display: grid to .gallery to enable grid layout.",
"previewHTML": "$79
$199
$49
$35
$89
$129