Re:HTML is object code
by olavk on Sunday August 02, 2009 @05:05AM
(#737238)
CSS1 was mostly about typography, but CSS2 supports layout equivalent to (or rather a superset of) what is possible with HTML tables.
[ Parent
| on HN ]
Here's a simple task you can't do in CSS2: Create a multi-line form where the labels are right-aligned to the fields, the fields all line up, and everything expands to fill the contents.
<style>
label { display: table-row; }
span { display: table-cell; }
</style>
<label><span>Label:</span>
<span><input type=text></span></label>
<label><span>Longer label:</span>
<span><input type=checkbox></span></label>My bad, didn't check my facts, table-cell is in CSS2! Of course, in my defense, it doesn't matter which standard it's defined in if it isn't supported by IE. It isn't even supported in IE7 and we've just recently dropped support for IE6.