Example
A simple grid-template-columns property example:
Laboratory
description & Usage
To determine the number and width of columns in a grid layout, we use the grid-template-columns property.
Browser compatibility and Support
# |
Chrome |
Edge |
Firefox |
Safari |
Opera |
grid-template-columns |
|
|
|
|
|
Values
Values |
Description |
none
|
Default
|
auto
|
Automatically determines the size of the columns.
|
max-content
|
Calculates the size of the columns relative to the largest column on that page.
|
min-content
|
It calculates the size of the columns relative to the smallest column in that page.
|
length
|
Calculates the size of the columns relative to the legal length set on that page.
|
initial
|
Adds this value to its default property.
|
inherit
|
It inherits this value from its parent tag.
|