Understanding fr Units in CSS Grid
In CSS Grid, the fr unit stands for fractional unit. It represents a portion of the available space in the grid container. Using fr makes it easy to create flexible, responsive layouts that automatically distribute space among grid columns or rows.
1fr represents one fraction of the available space in the grid container.
You can combine fr with fixed units like px or % to create mixed layouts.
If you define multiple columns with fr, the available space is divided proportionally.
fr units make layouts responsive without needing to calculate widths manually.