HTML & CSS · Middle · Question 10 of 75
When is Grid more appropriate, and when Flexbox?
- ✓Correct answer: Grid for two-dimensional layouts, Flexbox for one-dimensional ones (a row or a column)
- 2Flexbox is obsolete: Grid fully replaces it and is faster
- 3Grid only for tabular data, Flexbox for everything else
Explanation
Flexbox arranges items along a single axis and suits "content defines size": menus, toolbars, alignment within a component. Grid controls both axes at once and suits "layout defines size": page layouts, galleries. Both are current and often used together.