← Back to properties

CSS Property

grid-template-columns

Grid

Defines the column track sizes in a grid container.

Syntax

grid-template-columns: value;

Example

grid-template-columns: repeat(3, 1fr);

Common use cases

  • Creating equal-width column layouts
  • Responsive grids with auto-fill
  • Mixed fixed and flexible columns

Practical developer insight

1fr means one fraction of the available space — use repeat(auto-fill, minmax(200px, 1fr)) for responsive grids without media queries.

Related properties