M
Martin
I trying to generate a table laid out like this:
|----------|-----------------------------------------------|
| | - - - - - Some Text Here - - - - - |
|----------|-----------------------|-----------------------|
| | And Here Too | And Here Three |
|----------|-----------|-----------|-----------|-----------|
| | ABC | DEF | | |
|----------|-----------|-----------|-----------|-----------|
| | | XSW | 123 | |
|----------|-----------|-----------|-----------|-----------|
That is, all of the columns being the same size with
some columns having "headers".
I would like to specify the overall width of the table
to be a percentage and the columns to be a percentage of
the table width.
I'm using:
<TABLE width="80%" cols=5>
And then:
<COLGROUP>
<col width="20%">
<col width="20%">
<col width="20%">
<col width="20%">
<col width="20%">
</COLGROUP>
But, when I try to specify the various colspans,
the width of the columns seems to revert to
some kind of default (with the width depending
on how much data is in the cell).
<tr>
<td> </td>
<td colspan=4>- - - - - Some Text Here - - - - -</td>
</tr>
<tr>
<td> </td>
<td colspan=2>And Here Too</td>
<td colspan=2>And Here Three</td>
</tr>
<tr>
<td> </td>
<td>ABC</td>
<td>DEF</td>
<td> </td>
<td> </td>
</tr>
Can someone give me a clue as to what I'm doing wrong here?
Thanks.
|----------|-----------------------------------------------|
| | - - - - - Some Text Here - - - - - |
|----------|-----------------------|-----------------------|
| | And Here Too | And Here Three |
|----------|-----------|-----------|-----------|-----------|
| | ABC | DEF | | |
|----------|-----------|-----------|-----------|-----------|
| | | XSW | 123 | |
|----------|-----------|-----------|-----------|-----------|
That is, all of the columns being the same size with
some columns having "headers".
I would like to specify the overall width of the table
to be a percentage and the columns to be a percentage of
the table width.
I'm using:
<TABLE width="80%" cols=5>
And then:
<COLGROUP>
<col width="20%">
<col width="20%">
<col width="20%">
<col width="20%">
<col width="20%">
</COLGROUP>
But, when I try to specify the various colspans,
the width of the columns seems to revert to
some kind of default (with the width depending
on how much data is in the cell).
<tr>
<td> </td>
<td colspan=4>- - - - - Some Text Here - - - - -</td>
</tr>
<tr>
<td> </td>
<td colspan=2>And Here Too</td>
<td colspan=2>And Here Three</td>
</tr>
<tr>
<td> </td>
<td>ABC</td>
<td>DEF</td>
<td> </td>
<td> </td>
</tr>
Can someone give me a clue as to what I'm doing wrong here?
Thanks.