[thelist] Accessing table cell properties with CSS?

James Aylard evolt at pixelwright.com
Tue Jul 2 15:28:01 CDT 2002


> You don't have to use fixed to enforce your cell size. You can use auto
> as long as the give a mim-width: and a max-width: for the cells.
> http://www.w3.org/TR/REC-CSS2/tables.html#auto-table-layout

    I think you've misinterpreted the table-layout portion of the CSS 2
spec. The references to minimum and maximum widths in the section that you
site are values computed by the UA based on the content of the cells, not
values supplied by the developer for min-width or max-width properties. In
fact, min-width and max-width are not even supposed to apply to table
elements [1], including tds [2]. (Granted, IE 6 now implements the related
min-height property _only_ on certain table elements, but this is contrary
to the CSS 2 recommendation.) To reliably strong-arm the width of a table
cell using CSS, you have to use table-layout: fixed.

1. http://www.w3.org/TR/REC-CSS2/visudet.html#min-max-widths
2. http://www.w3.org/TR/REC-CSS2/tables.html#x2

James Aylard

More information about the thelist mailing list