3 ms·
It may seem like that, but the major difference is the layout is left to the CSS. When combined with css media queries, the grid can provide a complete restruc
by kirkbackus 13y ago
It may seem like that, but the major difference is the layout is left to the CSS. When combined with css media queries, the grid can provide a complete restructuring of the layout completely independent of the markup which would not would have been possible with tables.
- ahoy 13y agoThis is a hugely important difference.
- SideburnsOfDoom 13y agoGrids are also significantly more flexible and more responsive than tables. You finally get reliable vertical centering of elements as a side-benefit. Tables got a very bad name because they were abused back when they were the only thing available for layout: "if the only tool you have is a hammer..." Yes, but sometimes data is actually tabular. Grids are good for UI layout. The web was just for documents, but not any more. So now we need good ways to lay out UIs.
- chrismonsanto 13y ago> You finally get reliable vertical centering of elements as a side-benefit. Worth noting that you already get this with flexbox's align-items: center, which you can use today!
- jimmcslim 13y agoA comment on the original link stated that 'flexbox is slow', someone responded with a question; 'is the spec inherently slow or just current implementations?' but no-one elaborated.
- coldtea 13y ago>Tables got a very bad name because they were abused back when they were the only thing available for layout: "if the only tool you have is a hammer..." Yes, but sometimes data is actually tabular. Not only that: layouts are actually tabular (grid based) themselves. That's why tables were, even if not created for layout, an untuitive fit for doing layout work.