Re: Minimum width -
01-19-2005
, 09:09 PM
André,
CSS has min-width and max-width properties that relate to this. You
can put min-width on the individual cells to keep them wide enough and
max-width on the table to stop it from overflowing the width of the
page. For example:
table { max-width: 100%; }
td { min-width: 5em; }
There are, however, some problems with this. First you'll need to
check with the spec to find out what should happen when these min- and
max- constraints conflict. I think you want the max-width to win - is
that what wil happen? Maybe some more knowedgable reader knows all
about this.
Second problem is that Internet Explorer doesn't support these
properties. But you can work around this by installing IE7 (google for
it if you haven't heard of it). In my experience IE7 is a bit slow
imposing max-width, but you should have a go.
Regards,
--Phil. |