Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Position of tables

Status
Not open for further replies.

thelordoftherings

Programmer
May 16, 2004
616
IL
Hello,

I would like to put two tables - one below the other.
I am using this code:

<TABLE>
...
</TABLE>

<TABLE>
...
</TABLE>

The problem is that the lower table is not below the other the table but I have one table at the right of the page and one at the left. Why is that and how do I fix it without using frames (I would like the whole page to be as one frame)?
 
You have to nest the tables. So for example if you want a table to be on top of another table use the following code:

<table width="764" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="764" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>&nbsp;</td>
</tr>
</table></td>
</tr>
<tr>
<td><table width="764" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>&nbsp;</td>
</tr>
</table></td>
</tr>
</table>

The art of nesting tables is great for simple web users to be able to position tables. What I have done above, is created a table, and given it 2 rows. Then I just added individual tables inside the first initial table rows. Please ask if this does not make sense.
 
Errr... foxymorons, you don't need to nest tables to get one to appear under the other, just do this:
Code:
<table width="764" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<table width="764" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>

-- Chris Hunt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top