CSS responsive grid layout


Fri Jul 15 2022 01:07:45 GMT+0000 (UTC)

Saved by @jadorkor #css #html

{display: grid; align-items: center; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));}

//For a min value of 240px and a max value of the available width of container, i.e. 1fr

Media queries are not required because the grid is responsive to screens of various sizes and it arranges items based on screen size