I have a little peculiar problem that I currently solve using a table
, see below. Basically, I want to have two divs take up 100% of the available width, but only take up as much vertical space as needed (which isn't really that obvious from the picture). The two should at all times have the exact same height with a little line between them, as shown.
alt text http://pici.se/pictures/qJRMtoLPv.png
This is all very easy to do using table
, which I'm currently doing. However, I'm not too keen on the solution, as semantically this is not actually a table.
It is year 2012+n, so if you no longer care about IE6/7,
display:table
,display:table-row
anddisplay:table-cell
work in all modern browsers:http://www.456bereastreet.com/archive/200405/equal_height_boxes_with_css/
Update 2016-06-17: If you think time has come for
display:flex
, check out Flexbox Froggy.