Click to See Complete Forum and Search --> : Table Basics


aio
June 5th, 2002, 11:31 AM
Hi there,

I'm new to HTML. Please help me out on a table like this.

+-------------------+
| |
+---+-------+-------+
| | | |
| +-------+-------+
| | |
+---+---------------+

No need for dimensions and other things. I am just confused on the codes for columns and rows that overlaps.

Thanks

Akim
June 5th, 2002, 12:05 PM
<table border="1" width="100%">
<tr>
<td width="100%" colspan="3">&nbsp;</td>
</tr>
<tr>
<td width="50%" rowspan="2">&nbsp;</td>
<td width="25%">&nbsp;</td>
<td width="25%">&nbsp;</td>
</tr>
<tr>
<td width="50%" colspan="2">&nbsp;</td>
</tr>
</table>
The easiest way do get a code is to build a table in any HTML editor and view its source.

aio
June 5th, 2002, 06:34 PM
Thanks Akim,

I will test the code later.

I tried Visual Interderv but can't seem to make it overlap. I probably missed something.

Besides, I am still learning, so I want it manual and focused on the code. The HTML editor is generating codes including those I don't need. For now, they are still arcane to me.

Akim
June 5th, 2002, 09:20 PM
I'm not a "Pro", but know a few things :)

Basicaly, <TR></TR> specifies a row in a table.
Table - 3 Rows and 3 Columns (<TD></TD> specifies a column):

<TABLE id="Table1" width="300" border="1">
<TR>
<TD></TD>
<TD></TD>
<TD></TD>
</TR>
<TR>
<TD></TD>
<TD></TD>
<TD></TD>
</TR>
<TR>
<TD></TD>
<TD></TD>
<TD></TD>
</TR>
</TABLE>


COLSPAN (Sets or retrieves the number columns in the table that the object should span.):

<TABLE id="Table1" width="300" border="1">
<TR>
<TD colspan="2"></TD> 'span 2 first rows
<TD></TD>
</TR>
<TR>
<TD></TD>
<TD></TD>
<TD></TD>
</TR>
<TR>
<TD></TD>
<TD></TD>
<TD></TD>
</TR>
</TABLE>


ROWSPAN (Sets or retrieves how many rows in a table the cell should span.)

<TABLE id="Table1" width="300" border="1">
<TR>
<TD colspan="2"></TD> 'span 2 first rows
<TD></TD>
</TR>
<TR>
<TD rowspan="2"></TD> 'span 2 rows
<TD></TD>
<TD></TD>
</TR>
<TR>
<TD></TD>
<TD></TD>
</TR>
</TABLE>