|
Posted by Andy Dingley on 10/07/11 12:01
On 27 Jan, 19:43, richard <I.dont.c...@do.you> wrote:
> .cell {float:left;}
> .row {clear:left;}
> Then it will look like a table.
No, it will look like a bunch of floated <div>, not quite like a
<table>.
Consider both these examples, with multiple rows and with varying
lengths of data in each cell. For a <table>, or the CSS example using
display:table-cell; then these columns will line up vertically. Using
floated <div>, each <div> will determine its own, differing width
according to the content that's in it.
You _could_ hard-code the width of all the <div> cells to all be the
same, but then you lose the dynamically self-sizing behaviour that's
one of the most useful aspects of table-like layout.
[Back to original message]
|