CSS Grid is a two-dimensional layout system for creating complex page layouts with rows and columns.
Container Properties
display: grid— enables grid layoutgrid-template-columns— define column tracks:1fr 2fr,repeat(3, 1fr)grid-template-rows— define row tracksgap— space between grid itemsgrid-area— name areas for placement
Item Properties
grid-column— which columns to spangrid-row— which rows to spangrid-area— place into named area
The fr Unit
fr (fraction) distributes available space proportionally. 1fr 2fr gives the second column twice the space of the first.