css grid problem with background and wrapping
I have a grid where I want it to work somewhat like it is except when there are only 1 or 2 cells I want it to auto size and not be a set of 3 with the last one holding its cell space. When I set repeat(3, 100px) value to auto-fit then it kills the column layout. I still need it to wrap at 3. .parent { background: #f4f4f5; font-size:2em; border: 1px solid black; padding: 20px 0; text-align: center; width: 100%; } .parent .wrapper { display: inline-grid; grid-template-columns: repeat(3, 100px); box-shadow: 1px 0px 5px 0px rgba(0,0,0,0.75); grid-auto-flow: row; background-color: white; } .cell {