4 ms·
"About how the only way to get two columns of equal height, but that expand to fit the text, is to use a <table>, but that this is supposedly disallowed because
by joshuacc 13y ago
"About how the only way to get two columns of equal height, but that expand to fit the text, is to use a <table>, but that this is supposedly disallowed because it's "unsemantic"."
This is incorrect. Using display: table and display: table-cell allows you to achieve equal height columns.
- barrkel 13y agoWell yes, if you make a div work like a table and a nested div work like a table cell, you can indeed technically get away without using tables and cells, but you're fooling nobody.
- jonahx 13y ago+1. In what world, other than the current one fraught with our bizarre legacy, would you link the concept of vertical centering with the concept of "tables" and "cells"? How about: "display:non-idiotic-mode" and "display:layout-support-any-sane-person-would-expect", and now you can use "vertical-align"? A bit verbose but more accurate!
- unclebucknasty 13y agoTables (or grids) are a very natural way of thinking about layout. Just about every webapp/site uses some sort of grid scheme as its layout model. This is probably why the woefully layout-inadequate CSS had to include these hacks to mimic table behavior. So, it's more like CSS is fooling nobody.