Scripsit Rudi Hausmann:
I want to create a table with following fixed width, no matter what
content is inside of the table cells:
100 40 40 (first row with 1 + 2 cells)
100 10 10 10 10 10 10 10 10 (2nd, 3rd, 4th, etc. with 1 + 8 cells)
Just stop wanting that. Problem solved. If some other problem remains,
please tell what it was. What made you want to use fixed widths on a media
that is by definition and by essence flexible and varying? The canvas width
may vary from zero pixels (e.g., speech browser) to infinity.
Technically, you _can_ create fixed-width tables, though not really in HTML
alone, in the general case. You need CSS, specifically the table-layout:
fixed setting. And then you have the overflow problem, which might be harder
than you expect, though quite possibly you would never see it - just your
visitors would see the consequences, like content omitted without notice. In
your case, you would use <colelements for setting the widths, either via
width="..." attributes or using some simple CSS.
Sketchy example:
<table>
<col class="a">
<col><col><col><col><col><col><col><col>
<tr><td>x</td><td colspan="4">x</td><td colspan="4">x</td></tr>
<tr><td>x</td><td>x</td><td>x</td><td>x</td><td>x</td>
<td>x</td><td>x</td><td>x</td><td>x</td></tr>
</table>
to be used with CSS code
table { table-layout: fixed; }
col.a { width: 100px; }
col { width: 10px; }
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/