Forum Moderators: open
According to the W3C, if I have a table with no given width, then the width is determined by the user agent.
And along the same vein, if I have a column with no width, the column will only be as wide as the widest element within it.
On most of the browsers that I tested (mainly FF and IE5+ on Windows), this means that the table width will adjust to the sum of the columns.
What I’m wondering is this:
1. Are there cases (e.g. certain browsers) where the table width is GREATER than the sum of the no-width columns?
2. Are there cases where a no-width column will have a greater width than the widest element within it?
3. And lastly, is it strongly recommended to have both a table width and a column width? I know it’s suppose to help speed of the rendering of tables, but is it ok to not have it?
Thanks for any clarification on this!
Using CSS you can control these. As to you questions:
HTH
The main reason I asked this is because I'm generating this table of data based on filters that the user selects--so the table can have any number of columns.
And so I want the column widths to be semi-based on the data within them (i.e. the width should be no longer than the data, but at the same time, wrap if the browser window is smaller).