470,634 Members | 2,138 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,634 developers. It's quick & easy.

table-layout: fixed; cell sizing

Does anyone know a work around for "table-layout: fixed;" to prevent the automatic evenly space cells width without assigning classes or ID to cells?

My program prints a HTML "report" file and I used "table-layout: fixed; width:691px;" because the reports have to be printed on 8.5x11 paper. I didn't want the table to resize or anything.

Then after I added that property to the table, the data cells no longer "fit to contents" even with a "width:auto;" as a property. The cells are evenly spaced across the width of the entire table. :(
one of the cells is a "index" (count or the table row) and being wide as a date looks "funny" I need them to auto size...

Remember the cells MUST be <td>data</td> (no other text is allowed due to char limiting in IE! more details below)

Detail Reason: (Detailed read if only need to know why I can't use classes or IDs)
I'm working on a program that generates reports in HTML
It used to use XML and draw the table from a XML file, but IE's XML processing takes over 15mins to show a normal length of 20k XML data segments.
Now our end users are complaining about how long it take to display all of the data; As some of them are showing more then 300,000 data points and can take hours or fill up the virtual memory (IE seems buggy on this respect, I had it using over >2Gb of virtual ram processing a 300k XML file!)

So we changed our program to print the data in raw HTML, but it takes about 30second of IE showing NOTHING (white page) then ALL the data is displayed. I looked into the problem more with sysinternal's "procmon" and IE reads in HTML files at about 8700 chars a time, so I set about formatting the entire data to match our current layout just using CSS to remove unneeded characters for faster processing.
Due to this character read limit of IE we took out line break characters, and all class="" and id="" (they add up when printing 309,000 of them!!!)

I have the basic format exactly the same as before but with the problem listed above...
Aug 31 '07 #1
2 5571
Bah, hate when you try to do something a "new" way when there is a lesser known OLD way which solves your issue faster than you can blink at...

The answer was to use the <colgroup><col></col></colgroup> of a table URL: http://www.w3schools.com/tags/tag_col.asp
Sep 5 '07 #2
thanks for the idea here it help me with my IE6 table column width bug
Oct 15 '10 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

15 posts views Thread by Xah Lee | last post: by
3 posts views Thread by Terrence Brannon | last post: by
4 posts views Thread by maricel | last post: by
4 posts views Thread by Simone Battagliero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.