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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with aligning tables in HTML

Status
Not open for further replies.

dantep6

Technical User
May 26, 2005
2
US
I am trying to construct a page where I want to 3 tables underneath each other next to another column of tables.
I can only get the tables to show up next to each other horizontally.
I know it will involve the <tr> tab but when i place them in to make the second row the first one stays on top and the second one goes on the bottom of the page.

 
<Table>
<tr>
<td id="column1ofTables">
<table>
<tr>
<td>
<table id="column1table1">
<tr>
<td>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table id="column1table2">
<tr>
<td>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table id="column1table3">
<tr>
<td>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td id="column2ofTables">
<table>
<tr>
<td>
<table id="column2table1">
<tr>
<td>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table id="column2table2">
<tr>
<td>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table id="column2table3">
<tr>
<td>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>


 
I left borders on for testing purposes:
<table border="1" cellpadding="0" cellspacing="0">
<tr>
<td width="50%"> &nbsp; </td>
<td width="50%">
<table border="1" cellpadding="0" cellspacing="0">
<tr><td>
<table border="1" cellpadding="0" cellspacing="0">
<tr>
<td>Table 1</td>
</tr></table>
</td></tr>
<tr><td>
<table border="1" cellpadding="0" cellspacing="0">
<tr>
<td>Table 2</td>
</tr></table>
</td></tr>
<tr><td>
<table border="1" cellpadding="0" cellspacing="0">
<tr>
<td>Table 3</td>
</tr></table>
</td></tr></table>
</td>
</tr></table>
 
Thanks for the reply that is very helpful, but one more thing is now i want to have a layout like how you have mentioned which i can get to work fine. But I am still have problems aligning my second column of tables with the first. here is what I am looking for in terms of layout.

Top of Page
Table 1 Table 4
Table 2 Table 5
Table 3 Table 6


I know it involves the <tr> and <td> tags but I will not come up to the top of my page it always at the bottom I must be missing an end tag of something.. Im not sure
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top