
Grid-auto-columns Property
The grid-auto-columns property sets a size for the columns in a grid container.
This property affects only columns with the size not set.
auto | Default value. The size of the columns is determined by the size of the container |
fit-content() | |
max-content | Sets the size of each column depending on the largest item in the column |
min-content | Sets the size of each column depending on the smallest item in the column |
minmax(min.max) | Sets a size range greater than or equal to min and less than or equal to max |
length | Sets the size of the columns, by using a legal length value. |
% | Sets the size of the columns, by using a percent value |
Code:
<!DOCTYPE html>
<html>
<head>
<style>
.item1 { grid-area: 1 / 1 / 2 / 2; }
.item2 { grid-area: