Example

A simple grid-auto-columns property example:

Laboratory

description & Usage

To determine the size of the columns of a grid layout, we use the grid-auto-columns property.

Informations

# Description
Default Value auto
Inherited no
Animatable yes
Version CSS Grid Layout Module Level 1
JavaScript syntax object.style.gridAutoColumns="120px"

Browser compatibility and Support

# Chrome Edge Firefox Safari Opera
grid-auto-columns

Syntax

Values

Values Description
auto Default
max-content Sets the size of each column to be the same size as the largest column.
min-content Sets the size of each column to be the same size as the smallest column.