HTML & CSS · Junior · Question 32 of 75
What does grid-template-columns: repeat(3, 1fr) define?
- 1Three 1-pixel-wide columns, with the rest of the space empty
- 2Three rows of equal height stretched across the container
- ✓Correct answer: Three columns that share the available space equally
Explanation
repeat(3, 1fr) is the same as 1fr 1fr 1fr. The fr unit is a fraction of the grid container's free space. Rows are defined with grid-template-rows. Caveat: 1fr means minmax(auto, 1fr) by default, so long content can stretch a column.