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

Question about run-in and floats

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Thu, 14 Jan 2010 16:49:05 -0500
Message-ID: <4B4F9151.3040201@mit.edu>
To: www-style list <www-style@w3.org>
Consider the following testcase:

<!DOCTYPE html>
   <span style="display:run-in">
     <span style="float: left">Some text</span>
   <div style="clear:both">More text</div>

What is the expected rendering?  I believe the agreed-on behavior for 
the run-in here was that the run-in should run in and the containing 
block for the float should be the div, but the section on 'clear' says:

     The clearance of the generated box is set to the amount necessary
     to place the top border edge below the bottom outer edge of any
     right-floating and left-floating boxes that resulted from elements
     earlier in the source document. [1]

In this case the float is clearly resulting from "elements earlier in 
the source document".

How do we want to reconcile these two things?  It seems to me that the 
definition of 'clear' needs to be modified, or the behavior of run-ins 
needs to be changed to not run in if that would cause floats to float 
out of them.


[1] http://www.w3.org/TR/CSS21/visuren.html#flow-control
Received on Thursday, 14 January 2010 21:56:23 UTC

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