N. Demos wrote:
Gus,
Thanks for the reply and the reference. So just to make sure I
understand. With a fixed table-layout, using any finite width value
(read: not auto) for the table will render the table width according to
an algorithm which will be greater than or equal to assigned individual
cell widths.
Equal to, yes. Greater than, I think not.
The table will not be rendered with the assigned width,
unless the algorithm calculates the sum of the table's components widths
to be less than this assigned value. Is this essentially correct?
I think not. Take the width:0; for example which will always be less
than the sum of the components. I must confess that I'm not too strong
on tables, but IIRC the table width is not a fixed width, but is
actually the *minimum width* requested for the table.
To be honest, when I read through the algorithms, they were leading me
back and forth and I was starting to get a headache. ;-)
In any case, I got lost and confused and will have to study it all in
greater detail when I have more time. That was why I was hoping for
someone to jump in.
My second sentence is of importance for your example. You have no width
applied to Table, so it takes on the width of the container (the div)
causing your cells to be reduced in size. It is irrespective of if it is
table-layout:fixed; or not. Remove the table (which has no width
defined) from the div such that the container will be body and see the
same behavior by reducing the viewport size smaller than the table and
the table will shrink to fit. (IE, of course, does not behave like
that.) If, on the other hand, you apply a width of say 500px, which is
less than the total of the components, and reduce the viewport to less
than that, then the table will no longer shrink to fit below the 500px size.
--
Gus