|
Posted by Ben C on 01/31/08 08:36
On 2008-01-31, rf <rf@invalid.com> wrote:
>
><plenty900@yahoo.com> wrote in message
> news:6b139bab-cd18-413e-b117-12c6cba33b15@s13g2000prd.googlegroups.com...
>> Hi folks,
>>
>> I've got some HTML like this:
>>
>> <DIV>
>> <DIV style="float: left; width: 40"> text </DIV>
>> <DIV style="float: left; width: 40"> text </DIV>
>> <DIV style="float: left; width: 40"> text </DIV>
>> </DIV>
>> <DIV>
>> <DIV style="float: left; width: 40"> text </DIV>
>> <DIV style="float: left; width: 40"> text </DIV>
>> <DIV style="float: left; width: 40"> text </DIV>
>> </DIV>
>>
>> I'm finding that the second outer DIV is appearing
>> to the right of the first outer DIV.
>
> No it isn't. It is below the first div.
In a sense, although both divs have zero height, so they are in this
case also on top of each other, which is a special case of below.
As dorayme points out, the floats in each div do always go at least
below the the top inside padding edge of the block they're in.
It's only because, with no borders or padding on the blocks, the top
inside padding edges of the two divs are in exactly the same position
that the floats are all aligned vertically with each other.
Navigation:
[Reply to this message]
|