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

Re: [css3-gcpm] containing block for top/bottom floats

From: MURAKAMI Shinyu <murakami@antenna.co.jp>
Date: Mon, 05 Jan 2009 12:58:36 +0900
To: Håkon Wium Lie <howcome@opera.com>
Cc: www-style@w3.org
Message-Id: <20090105040845.C2A0.C598BCD7@antenna.co.jp>

Håkon Wium Lie <howcome@opera.com> wrote on 2009/01/04 23:10:04
>  > I expect the top-float is floated to the top of the current column.
> 
> Yes. 
> 
>  > But that is not obvious in the GCPM spec.
> 
> Right. However, the multicol specification [1] says:
> 
>   Floats that appear inside multi-column layouts are positioned with
>   regard to the column box where the float appears.
> 
>   [1] http://dev.w3.org/csswg/css3-multicol/
> 
>  > My proposal:
>  > When the float property value has a vertical keyword (top, bottom) and
>  > has no reference keyword (page, multi-column), the containing block is
>  > formed by the content edge of the nearest box that is a column box or 
>  > is a "flow root" defined in the CSS3 basic box model [3] or page area.
>  > In vertical text, a horizontal keyword is vice versa.
> 
> Again, from the multicol specification [1]:
> 
>   Column boxes act like block-level, table cell, and inline-block
>   boxes as per CSS 2.1, section 10.1, item 2 [CSS21]. As a result,
>   floats are positioned with regard to the column box. However, the
>   column box does not establish a containing block for elements with
>   'position: fixed' or 'position: absolute'.
> 
> So, there are reasons to not make the column box a containing block.
> 
> However, I agree that GCPM should state that floats float within the
> column box unless "page" or "multi-column" is specified. I propose to
> express it in the description of "page" and "multi-column":
> 
>    <dt>page 
> 
>    <dd>This keyword indicates that the page box (and not the column
>    box) acts as containing block for the purpose of 'float'
> 
>    <dt>multi-column
> 
>    <dd>This keyword indicates that the multi-column element (and not
>    the column box) acts as containing block for the purpose of 'float'
> 
> Could this work?


Some questions:

If column box does not exist, i.e., no multi-column elements, is 
'float: top' equivalent to 'float: top page'?

Table-cells, inline-blocks, floats, and absolute/fixed positioned boxes
do not act as containing block for the purpose of 'float: top'?

Example:
<table>
  <tr>
    <td>table-cell
       <div style="float:top">top-float in table-cell</div>
    </td>
  </tr>
</table>

Is this top-float floated to the top of the page, or to the top of the
table-cell?

-- 
Shinyu Murakami
http://www.antennahouse.com
http://www.antenna.co.jp/AHF/
Received on Monday, 5 January 2009 03:59:40 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:15 GMT