Re: CSS2.x fixed table layout

At 20:40 +0200 10/5/02, Rijk van Geijtenbeek wrote:

>If column elements are not explicitly added (with COL or COLGROUP or
>other elements declared to be "table-column" or "table-column-group"),
>what else is a column but the cells that it represents?

    I don't know.  I've never liked column elements anyway, but that's 
a discussion for another list.

>4. A column group box occupies the same grid cells as the columns it
>contains.

    I don't see how that really addresses the question; to me it seems 
rather circular.  A column group is the size of its columns-- great. 
How are the column widths calculated?  This is the point on which I'm 
unclear.  Do column widths depends on the widths of cells, or do the 
cells follow the column width?  To frame it a little differently, if 
a column element is not explicitly given, we could assume its 'width' 
to be 'auto'-- which then could imply that the column's width depends 
on the cells within it.  Conversely, it could imply that the 'auto' 
width depends on the width of the table itself, and the cells are fit 
to the resulting calculated width for the column.  I'd like to see 
CSS2.1 say one way or the other, if it doesn't already in some way 
I'm not picking up.  (I can be fairly dense from time to time.)

>6. A cell box cannot extend beyond the last row box of a
>table or row-group; the user agents must shorten it until it fits.

    That's good for the vertical case, but doesn't address the 
horizontal.  I would be happy to have horizontal behavior be the 
same, but it needs to be stated.

>>  and we do have precedent for elements being visually wider than
>>  their parents.
>
>Hmm... the content of an element may overflow its width in some cases,
>but the element in question has not become wider. Nor does it become
>smaller if there are floating elements inside it.

    I was referring more to the case of:

     <div style="width: 300px; border: 1px solid gray;">
      <div style="width: 400px; background: silver;">...</div>
     </div>

The inner 'div' appears to protrude from its parent.  Mathematically 
it doesn't, as the right margin (in ltr languages) is set to -100px. 
Nonetheless it is possible to make elements wider than their parents, 
and thus my question about cells and columns.

>In the 'fixed' table-layout model, I would expect the cell to shrink
>(and maybe offer an overflow mechanism, for example the contents runs
>over the table cell border, or scrollbars appear). This is not what
>happens in current browsers though.

    Right.  So do we capture browser behavior in CSS2.1?  It seems to 
me that we should, unless there's a compelling reason to do otherwise.

--
Eric A. Meyer  (eric@meyerweb.com)  http://www.meyerweb.com/eric/
Author, "Cascading Style Sheets: The Definitive Guide,"
  "Eric Meyer on CSS," "CSS 2.0 Programmer's Reference," and more
   http://www.meyerweb.com/eric/books/

Received on Saturday, 5 October 2002 16:15:15 UTC