grid-template-columns: repeat(3, minmax(0, 1fr)); code example Example: grid auto columns grid-template-columns: repeat( auto-fit, minmax(250px, 1fr) );