Table woes, please help!

Soldato
Joined
12 Jan 2004
Posts
6,824
Location
Londinium
Hey guys,

I'm generating reports using HTML tables and having loads of issues with regards to column widths.

Ideally, I want the table to show all cell content without wrapping or hiding anything, so the columns should automatically be wide enough to fit the cell with the longest contents.

However, I have the following caveats:

1. I don't know how many columns will be in the table
2. I can't set the width of the table (because it should be as wide as is needed, given the description above)
3. I am running expand/collapse operations on the table using jquery (when a button is clicked) and so performance is also an issue (currently IE runs dog slow, firefox is lightening fast)

I have tried various combinations of table-layout and white-space css properties but no joy yet.

Any recommendations? Or is this just not possible in IE?...
 
in the <td> tags use nowrap="nowrap" that will ensure the content does not wrap round but it will also let the table be larger than the browser window.
 
Back
Top Bottom