grid css auto code example Example: autofit grid css .grid { display: grid; grid-template-columns: repeat(auto-fit, 1fr); }