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

Re: [CSS21] 9.5.1: placing floats above earlier blocks & line boxes

From: Anton Prowse <prowse@moonhenge.net>
Date: Fri, 15 Oct 2010 10:30:08 +0100
Message-ID: <4CB81F20.4060207@moonhenge.net>
To: www-style@w3.org
CC: Alan Gresley <alan@css-class.com>, Peter Moulder <peter.moulder@monash.edu>
On 15/10/2010 06:27, Alan Gresley wrote:
> Anton Prowse wrote:
>> What do you feel about the relationship between the float and its
>> surrounding text? For example, in this case:
>> <p>Blah.</p>
>> <p>Blah.</p>
>> <p>Blah.</p>
>> <p>An earlier block and line box</p>
>> <p style="margin-top: -6em;">
>> text
>> <span style="float:left;">A float.</span>
>> text text text text text text text text text text text</p>
>> in a sufficiently narrow container, should the float remain on the
>> same line as the "float placeholder" (a convenient device despite not
>> actually being part of the spec)? In other words, if the float is
>> forced to "stay down", does the subsequent text stay down with it,
>> creating a gap between the previous line box and this one? Or does the
>> float get placed lower than its placeholder? I certainly dislike the
>> former, but even with the latter I don't really see the benefit since
>> the non-floated content of the p will be pulled upwards and overlap
>> the previous blocks even if the float is kept down.
> I agree with what you saying but I don't believe that your test shows
> correctly what you are trying to express. Correct me if I am wrong.
> <!DOCTYPE html>
> <p>Blah.</p>
> <p>Blah.</p>
> <p>Blah.</p>
> <p>An earlier block and line box</p>
> <p style="margin-top: -6em;border:1px solid red;background:
> rgba(0,255,155,0.4);">
> text text text text text text
> <span style="float:left;background: red;">A float.</span>
> text text text text text text text text text text text</p>
> The first run of line boxes does stay in the same position as the "float
> placeholder" even when the float has dropped after the viewport is
> narrowed.

I think you've misunderstood what we're saying, because in fact no UA 
does what Peter was exploring, namely keeping the float below the 
'earlier block and line box' when "pulling its containing paragraph 
upwards" (ie when applying the negative margin top).  So nothing that UA 
behaviour currently shows is relevant.

Anton Prowse
Received on Friday, 15 October 2010 09:30:45 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:39 UTC