Complete the code to create a grid container.
.container {
display: [1];
}The display: grid; property turns the container into a grid layout, allowing easy placement of items in rows and columns.
Complete the code to define two equal columns in the grid.
.container {
display: grid;
grid-template-columns: [1] [2];
}Using 1fr 1fr divides the container into two equal columns that share available space.
Fix the error in the grid code to properly set rows.
.container {
display: grid;
grid-template-rows: [1];
}The correct syntax for repeating rows is repeat(3, 1fr) with a comma separating the count and size.
Fill both blanks to create a grid with 3 columns and 2 rows.
.container {
display: grid;
grid-template-columns: [1];
grid-template-rows: [2];
}Using repeat(3, 1fr) creates 3 equal columns, and repeat(2, 100px) creates 2 rows each 100px tall.
Fill all three blanks to create a grid with 4 columns, 3 rows, and a gap between cells.
.container {
display: grid;
grid-template-columns: [1];
grid-template-rows: [2];
gap: [3];
}The code creates 4 equal columns, 3 rows each 150px tall, and a 10px gap between grid cells for spacing.