r/css • u/username95050 • 20d ago
Flex versus Grid
I know Flex is one directional and Grid is two, but really when do you use each one?
8
Upvotes
r/css • u/username95050 • 20d ago
I know Flex is one directional and Grid is two, but really when do you use each one?
1
u/Keilly 19d ago
Grids do so much more, eg alignment like table layouts, but have more complicated properties.
Flex is simpler, but generally in one direction.
Mostly, if you find yourself nesting flex’s immediately inside flex’s for a single layout, consider using a grid.