Loading Depth Study
Preparing your workspace
CSS Grid is a layout system designed to control rows and columns together.
Grid is useful when both rows and columns matter. You can define columns using grid-template-columns and create consistent spacing with gap. Fractional units such as 1fr allow the available space to be shared flexibly. Grid can also place elements across multiple columns or rows. It is especially useful for dashboards, galleries, course catalogs, and larger page layouts where two-dimensional control is helpful.
A course platform can display six course cards in a responsive grid that automatically changes the number of columns depending on available width.
.course-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 24px;
}
.featured {
grid-column: span 2;
}The course cards are arranged in three equal columns, while the featured card spans two columns.