3 ms·
<style> label { display: table-row; } span { display: table-cell; } </style> <label><span>Label:</span> <span><input type=text></span></label>
by olavk 17y ago
<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>
- wvenable 17y agoMy 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.