Click to See Complete Forum and Search --> : Simple Colspan Prob


lokksta
03-13-2005, 08:19 AM
Hi,

I have a problem with this code, it seems really simple but I just can't work it out. What I basically want to do is get the 4 cells at the top to span the 7 at the bottom. Here is the code:

<table width="100%" border="2">
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan="7">&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>

I have attached a screenshot from dreamweaver too, just so you can see exactly what I'm on about (it's quite heavily compressed to reduce filesize).

Thanks for any help.

lokksta
03-13-2005, 09:05 AM
Seems as though the sreenshot didn't appear so here it is.

the tree
03-13-2005, 11:22 AM
What type of tabular data would be aranged like that?
You could always give each of the cells in the top row a colspan of 2, except one of them.
Although I really can't see why you'd be doing this.

felgall
03-13-2005, 01:32 PM
Try this:

<table width="100%" border="2">
<tr>
<td colspan="7"> </td>
<td colspan="7"> </td>
<td colspan="7"> </td>
<td colspan="7"> </td>
</tr>
<tr>
<td colspan="28"> </td>
</tr>
<tr>
<td colspan="4"> </td>
<td colspan="4"> </td>
<td colspan="4"> </td>
<td colspan="4"> </td>
<td colspan="4"> </td>
<td colspan="4"> </td>
<td colspan="4"> </td>
</tr>
</table>

ray326
03-13-2005, 04:57 PM
If you don't want any column alignment then break it into two tables, one with a four column row, the other with seven. I agree with tree, the markup is nonsensical.