Answer
Create a grid layout by establishing a grid container and defining tracks. • grid-template-columns and grid-template-rows define explicit tracks. • gap creates spacing between tracks. • Use responsive track functions when item count or width can change.
💡 Simple Example
.cards {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
gap: 1rem;
}
⚡ Quick Revision
Set display:grid, define tracks, and let items occupy the grid.