You're going to need to nest a table to accomplish that. Is this what
you're looking for?
<table width="200" border="1" cellpadding="0" cellspacing="0">
<tr>
<td colspan="3">
<table width="100%" border="1" cellspacing="0" cellpadding="0">
<tr>
<td width="50"> </td>
<td width="50"> </td>
<td> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="50"> </td>
<td width="100"> </td>
<td width="50"> </td>
</tr>
<tr>
<td width="50"> </td>
<td width="100"> </td>
<td width="50"> </td>
</tr>
</table>
--
Ryan Kitlitz
http://ryan.kitlitz.com - portfolio
http://breadstick.cyntaks.com - personal
Or you can simply add
<tr>
<td width="50"></td>
<td width="50"></td>
<td width="50"></td>
<td width="50"></td>
</tr>
at the top or bottom of your table...
Aphrael.
--
"La demande mondiale d'ordinateurs n'excŽdera pas cinq machines."
(Thomas Watson, Fondateur d'IBM, 1945)
I'm a little confused about what you're trying to accomplish. If you
want to have a cell with a width other than that of the cells above and
below it, you'll need to nest a table in that cell.
> I'm having some trouble in displaying a table with a certain
> configuration in firefox.
> I've been helplessly trying to display a table like:
>
> ------------------------
> | | | |
> ------------------------
> | | | |
> ------------------------
> | | | |
> ------------------------
That "picture" indicate that you want 4 columns on eatch row, with 2
columns merged together on eatch row. But the code you have gives only
3 columns. The colspan don't add any more columns automaticaly, only
merge 2 or more of the existing columns.
You need to add one more row, do it in the top of the table and then
the code can look like this:
<table width="200" border="1" cellpadding="0" cellspacing="0">
<tr>
<td width="50"> </td>
<td width="50"> </td>
<td width="50"> </td>
<td width="50" colspan="2"> </td>
</tr>
<tr>
<td width="50"> </td>
<td width="50"> </td>
<td width="100" colspan="2"> </td>
</tr>
<tr>
<td width="50"> </td>
<td width="100" colspan="2"> </td>
<td width="50"> </td>
</tr>
<tr>
<td width="50"> </td>
<td width="100" colspan="2"> </td>
<td width="50"> </td>
</tr>
</table>
--
/Arne
Top posters will be ignored. Quote the part you
are replying to, no more and no less! And don't
quote signatures, thank you.
Apparent goal is to have a FOUR column table where:
A cell spans third and fourth column in first row
A cell spans second and third column in the each of the second and third
rows
I was able to acomplish such in IE, but Firefox doesn't seem to understand
that four coumns are desired. In Firefox the COLSPAN appears to be ignored
when one of the columns doesn't have a non-spanned cell in another row. The
preview and tag views in Nvu seem to have the same issue, although the
colspan still shows up in the advanced cell properties..
1. The problem is not that the table is interpreted as 3x3.
The problem is that the 3rd of 4 columns has nearly zero width.
The <td> tags' width= attributes are not having the
effect that you want.
2. The table also looks wrong in IE6 and in IE4 (I just tested it).
3. To fix the problem, alter the <td> tags to use percentage widths
instead of fixed widths. This fixes the problem in both Firefox
and IE.
--
Cheers
Ralph
"Those who have knowledge, don't predict.
Those who predict, don't have knowledge."
-- Lao Tzu, 6th century B.C.
That's interesting... what if you need fixed widths on the cells?
If you need fixed widths, you should set fixed widths on the _columns_
and not on the cells. See the example below [2].
Each cell will take its width from the column(s) it spans.
Things you want to stay away from are
A. Specifying fixed widths on cells rather than on columns.
B. Specifying both a fixed width on the entire table (like the OP has)
and fixed widths on _all_ columns (or all cells) of the table.
References
[1] "HTML 4.01 Specification", Chapter 11 "Tables".
http://www.w3.org/TR/html401/struct/tables.html
Examples
[2] Fixed width on each _column_, not on table
<table border="1" cellpadding="0" cellspacing="0">
<colgroup><col width="50"><col width="50"><col width="50"><col width="50"></colgroup>
<tr>
<td> </td>
<td> </td>
<td colspan="2"> </td>
</tr>
<tr>
<td> </td>
<td colspan="2"> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td colspan="2"> </td>
<td> </td>
</tr>
</table>
--
Cheers,
Ralph
The early bird gets the worm, but the second mouse gets the cheese.