- From: Bruno Fassino <fassino@gmail.com>
- Date: Mon, 25 Jan 2010 08:05:19 +0100
- To: Anton Prowse <prowse@moonhenge.net>
- Cc: www-style <www-style@w3.org>
On Sun, Jan 24, 2010 at 5:37 PM, Anton Prowse <prowse@moonhenge.net> wrote:
> However, in this particular test case, I think the latter behaviour is
> desirable (in part due to the desire for continuity as seen when
> reducing the height of the float from >10px down to <10px, but also for
> consistency with the "easyclearing" technique whereby
> div:after {
> content: "";
> display: block;
> clear: both;
> }
> causes the div to expand to enclose its floated children, even though
> the generated content is empty)
But that's a more general matter. There are other cases when an
'empty' clear is not sufficient to make its parent to enclose floats
(because no clearance is necessary), for example:
<div style="background:lime">
<div style="float:left; width:100px; height: 100px; background:blue"></div>
<div style="height: 50px; margin-bottom: 50px"></div>
<div style="clear: left"></div>
</div>
(online here http://www.brunildo.org/test/margin-collapse-clear-7.html)
So I think easyclearing is always better applied with non empty
generated content and then height:0, visibility:hidden
Best regards,
Bruno
--
Bruno Fassino http://www.brunildo.org/test
Received on Monday, 25 January 2010 07:05:52 UTC