TIL auto fit multiple column with CSS grid
If you don't knwo how may items you will have and want them to fit in a row, you can use CSS grid. It is a powerful CSS feature (with my favourite flexbox)..container { display: grid; grid-template-columns: repeat(auto-fit, 160px); justify-content: center; gap: 20px; }The tricky…