Emil Björklund wrote: > I'm having major problems with applying height rules to a table. I > know setting heights for table cells or rows is tricky at best, but I > so need this to work, soon.... *losing hair*
It's tricky topic indeed. > An example page is up at http://ebdesign.se/table_problem.html, with > an accompaying sketch of what it's supposed to look like (if you use > IE) at http://ebdesign.se/table_problem.gif The problem is that when a table has, say, three rows that should have a specific total height (determined by an image in this case) and you would like to set specific heights for two of them and let the browser allocate the rest to the third row, IE just won't do this. It applies its own obscure layout algorithms. As a workaround, you could use nested tables, so that on the right of the image, you have just a single cell. Within that cell, you would have an inner table, aligned to the top of the enclosing cell. In your example, this would be a 2 by 2 table. The rest of the content of the enclosing cell would be empty, with no need for any artificial construct. But the structure as a whole would be somewhat illogical, since the columns of the inner table should relate to the columns of the outer cell but they don't, in the markup. The presentational manifestation of this problem is that they wouldn't by nature share the outer table's column widths. This could be fixed by using fixed (e.g., px valued) width settings for them. This means inflexibility, but you seem to be using fixed widths anyway. Another, simpler approach would mean fixing the heights as well. This means that you set the heights of the rows in pixels, or estimate them in pixels (making a guess on what em typically is in pixels, multiplying it by the line height, and adding the (defaulted) cell padding) and then set the height of the dummy cell in pixels so that the sum of the heights matches the height of the image cell. This too implies inflexibility, but your table as a whole isn't very flexible anyway. Jukka K. Korpela ("Yucca") http://www.cs.tut.fi/~jkorpela/ ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
