|
Posted by Ben C on 11/01/06 12:26
On 2006-11-01, Michael Fesser <netizen@gmx.de> wrote:
> .oO(Ben C)
>
>>I can't see what's wrong with using display: table and display:
>>table-cell if you need them. That way you can avoid presentational
>>markup.
>
> Doesn't work in IE.
I suspected that might be the reason.
>>For his form example, it's easy to get the automatic column widths by
>>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?
Obviously not all aspects of this method are the same as using tables,
but it works, and achieves the automatic column widths just as easily.
e.g.:
div
{
float: left;
background-color: gray;
line-height: 2em;
padding: 0.2em;
}
....
<div>
<label>Name:</label>
<br>
<label>Age:</label>
</div>
<div>
<input size="12">
<br>
<input size="8">
</div>
Navigation:
[Reply to this message]
|