|
Posted by Ben C on 11/01/06 14:01
On 2006-11-01, Michael Fesser <netizen@gmx.de> wrote:
> .oO(Ben C)
>
>>On 2006-11-01, Michael Fesser <netizen@gmx.de> wrote:
>>
>>>>using two floats with width: auto.
>>>
>>> One float for all the labels, the other for the controls?
>>
>>Exactly.
>>
>>> That's not going to work.
>>
>>Why not?
>
> Have a look at it without CSS.
It looks just the same as if I use semantic markup and display:
table-cell and remove the CSS.
If things must layout correctly without CSS then we must use
presentational markup. I didn't think that was the point.
> Additionally what happens if you want to use textareas or longer labels
> that may break? There's no way to line them up properly with their
> associated controls.
Agreed, that is the biggest problem with using floats in this example.
Basically you can control the columns of the simulated table quite
easily, but much less easily the rows. Each float is its own block level
box and minds its own business. Not like cells on a row in a table,
which have to agree on a common row height and in many cases a baseline.
You can't really get very far doing a grid with floats. But the orignal
article stated:
"A table is the right solution when we need one or more box to stretch
beyond the natural (content-determined) size, depending on the size of
sibling boxes."
I don't really agree with that.
But I do think table layout is the best thing for grids, and that that
form example is basically a grid.
Navigation:
[Reply to this message]
|