W3C home > Mailing lists > Public > www-style@w3.org > May 2008

RE: [CSS 21] overflow:hidden adjacent to a float

From: Rainer ┼hlfors <rahlfors@wildcatsoftware.net>
Date: Tue, 20 May 2008 09:03:35 -0600
Message-ID: <1103A877E41F7A46A6021A6C71DAA8560B1F29@denali.WildcatSoftware.local>
To: "Alan Gresley" <alan@css-class.com>
Cc: "David Woolley" <forums@david-woolley.me.uk>, <www-style@w3.org>
I fully assume that you meant:
 
<div style="float: left">
        <div style="float: left">
                <div style="overflow: hidden; margin-left: 200px">
                        <div style="float: left"> ..1st.. </div>
                        <div> ..2nd.. </div>
                </div>
        </div>
</div>


________________________________

From: www-style-request@w3.org on behalf of Alan Gresley
Sent: Tue 2008-05-20 7:43 AM
To: Alan Gresley
Cc: David Woolley; www-style@w3.org
Subject: Re: [CSS 21] overflow:hidden adjacent to a float




Alan Gresley wrote:

> If an author chooses to have a base layout such as:
>
>
> <div style="float:left">
>     <div style="float: left">
>     <div style="overflow: hidden; margin-left: 200px">
>         <div style="float:left">
>         <div> .... </div>
>     </div>
> </div>


And I thought I had checked that properly. Again the code:

<div style="float: left">
        <div style="float: left">
        <div style="overflow: hidden; margin-left: 200px">
                <div style="float: left"> ..1st.. </div>
                <div> ..2nd.. </div>
        </div>
</div>


Apart from the inner float (1st) be contained by it's parent with
overflow:hidden which establishes a new block formatting context, this
code also allow authors to stops the vertical margins collapsing for the
first and last in-flow child block elements in the static in-flow div
(2nd). It also possible to remove all the bottom margins of all the
floats to have content rising behind the floats. There are many possibles.

Very cool code indeed but a super CSS bug creator.


Alan

http://css-class.com/test/
Received on Tuesday, 20 May 2008 15:04:59 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:06 GMT