W3C home > Mailing lists > Public > www-style@w3.org > August 2010

Re: [CSS 2.1] [section 9.5 Floats] Empty floated element with a set ?width but height:0

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 4 Aug 2010 15:34:59 -0700
Message-ID: <AANLkTikSom1Vvp2ZoxxmxuhV9WTM-cuCuMChZAa3CfET@mail.gmail.com>
To: Anton Prowse <prowse@moonhenge.net>
Cc: www-style@w3.org, www-style@gtalbot.org
Some further information:

We agree that a zero-height float (or a float whos bottom edge is
incident with the top edge of a line box) doesn't force the line box
out of the way in any browser.

A further question concerns zero-height floats which appear in the
middle of a line.  For example:

<!DOCTYPE html>
<div style="float:left; width:50px; height:5px; background:blue;"></div>
<div style="float:left; clear:left; width:100px; height:0px;"></div>

The first float definitely shoves the text over by 50px.  The question
is whether the 0-height float should further push it or not.

Chrome doesn't push it, but that's part of a general bug where Webkit
doesn't take into account floats that don't intersect the top of the
line box.  (Make the second float 5px hight and give it a background
to see what I mean.)  So it's a wash, and tells us nothing.

Firefox doesn't push the text.

IE and Opera push the text.

If I'm recalling correctly (doesn't look like the comment made it into
the minutes today), Dbaron said he'd be willing to change the Firefox
behavior here (but it may make his current implementation strategy
slightly more difficult).

Received on Wednesday, 4 August 2010 22:35:54 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:49 UTC