This property specifies the size of a column in grid container.
Syntax -
grid-auto-columns: auto|max-content|min-content|length; |
Now we will see the values with descriptions -
Value |
Description |
auto |
Column size is determined by the container's size, and this is the default value. |
fit-content() |
This adjust the size according to this formula min(maximum size, max(minimum size, argument)) |
max-content |
This sets the size of each column depending on the largest item in the column |
min-content |
This sets the size of each column which depends on the smallest item in the column |
minmax(min.max) |
This sets a size range greater than or equal to min and less than or equal to max |
Now we will see the example -
Example -
Output -