in css grid seting the width on of the column to auto means code example Example: grid auto columns grid-template-columns: repeat( auto-fit, minmax(250px, 1fr) );