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

Trouble with HTML tables

Status
Not open for further replies.

tbcomputer

Technical User
Dec 6, 2002
30
0
0
US
Hi,

I am trying to place several tables into an HTML documents.
The format I need is 2 tables going down the left side and three tables in the center of the HTML document. I cant get the three tables in the center to line up with the two on the left side. Paste this code into a text editor, then my goal is to take the three bottom tables that are 70% in width and move them up to the top of the document..

Here is my html:

<td width=&quot;110&quot; valign=&quot;top&quot;>
<table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; bgcolor=&quot;#000000&quot; width=&quot;110&quot;>
<tr>
<td>
<table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;110&quot;>
<tr>
<td>
</tr>
</table>
<table border=&quot;0&quot; cellpadding=&quot;3&quot; cellspacing=&quot;1&quot; bgcolor=&quot;#000000&quot; width=&quot;100%&quot;>
<tr><td bgcolor=&quot;#008000&quot; align=&quot;center&quot;>
<b><FONT SIZE=3 COLOR=&quot;#bebebe&quot;>Main Menu</b></FONT>
</td></tr>
<tr>
<td bgcolor=&quot;#bebebe&quot;>
<A HREF=&quot;main.html&quot;><FONT COLOR=&quot;#000000&quot;><FONT SIZE=2>Home</FONT></A>&#032<BR>
<A HREF=&quot;whatsnew.htm&quot;><FONT COLOR=&quot;#000000&quot;><FONT SIZE=2>sample sample</FONT></A>&#032<BR>
<A HREF=&quot;sample.htm&quot;><FONT COLOR=&quot;#000000&quot;><FONT SIZE=2>sample sample</FONT></A><BR>
<A HREF=sample.html><FONT COLOR=&quot;#000000&quot;><FONT SIZE=2>sample</FONT></A><BR>
<A HREF=&quot;sample.html&quot;><FONT COLOR=&quot;#000000&quot;><FONT SIZE=2>sample </FONT></A><BR>

</td>
</tr>
</table></td></tr></table>
<br>


<td width=&quot;110&quot; valign=&quot;top&quot;>
<table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; bgcolor=&quot;#000000&quot; width=&quot;110&quot;>
<tr>
<td>
<table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;110&quot;>
<tr>
<td>
</tr>
</table>
<table border=&quot;0&quot; cellpadding=&quot;3&quot; cellspacing=&quot;1&quot; bgcolor=&quot;#000000&quot; width=&quot;100%&quot;>
<tr><td bgcolor=&quot;#008000&quot; align=&quot;center&quot;>
<b><FONT SIZE=3 COLOR=&quot;#bebebe&quot;>Links of interest</b></FONT>
</td></tr>
<tr>
<td bgcolor=&quot;#bebebe&quot;>
<A HREF= COLOR=&quot;#000000&quot;><FONT SIZE=2>sample</FONT></A>&#032<BR>
<A HREF=&quot;downloads.htm&quot;><FONT COLOR=&quot;#000000&quot;><FONT SIZE=2>Downloads</FONT></A>&#032<BR>
<A HREF=&quot;favoritesites.htm&quot;><FONT COLOR=&quot;#000000&quot;><FONT SIZE=2>Favorite Sites</FONT></A><BR>
<A HREF= COLOR=&quot;#000000&quot;><FONT SIZE=2>sample</FONT></A><BR>
<A HREF= COLOR=&quot;#000000&quot;><FONT SIZE=2>PC mods</FONT></A>&#032<BR>
<A HREF= COLOR=&quot;#000000&quot;><FONT SIZE=2>Linux OS's</FONT></A>&#032<BR>
</td>
</tr>
</table></td></tr></table>

<!---------------MAIN TABLES-------------------------------->
<table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; ALIGN=CENTER width=&quot;70%&quot;>
<tr>
<td>
<table border=&quot;0&quot; cellpadding=&quot;3&quot; cellspacing=&quot;1&quot; bgcolor=&quot;#000000&quot; width=&quot;100%&quot;>
<tr>
<td bgcolor=&quot;#008000&quot; align=&quot;center&quot;>
<b>PLACE TEXT HERE!!</B>
</td>
</tr>
<tr>
<td bgcolor=&quot;#D3D3D3&quot;>
<B>Place more text here!!</B>
</TABLE>
</TABLE>
<BR>

<table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; ALIGN=CENTER width=&quot;70%&quot;>
<tr>
<td>
<table border=&quot;0&quot; cellpadding=&quot;3&quot; cellspacing=&quot;1&quot; bgcolor=&quot;#000000&quot; width=&quot;100%&quot;>
<tr>
<td bgcolor=&quot;#008000&quot; align=&quot;center&quot;>
<b>PLACE TEXT HERE!!</B>
</td>
</tr>
<tr>
<td bgcolor=&quot;#D3D3D3&quot;>
<B>Place more text here!!</B>
</TABLE>
</TABLE>
<BR>

<table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; ALIGN=CENTER width=&quot;70%&quot;>
<tr>
<td>
<table border=&quot;0&quot; cellpadding=&quot;3&quot; cellspacing=&quot;1&quot; bgcolor=&quot;#000000&quot; width=&quot;100%&quot;>
<tr>
<td bgcolor=&quot;#008000&quot; align=&quot;center&quot;>
<FONT SIZE=2 COLOR=&quot;#bebebe&quot;>Visit <A HREF= TV</A></FONT>
</td>
</tr>
<tr>
<td bgcolor=&quot;#D3D3D3&quot;>
<B>Place more text here!!</B>
</TABLE>
</TABLE>
<BR>
Any help would be much appreciated.
 
from looking at that code I can see straight away that you are missing most of the closing tags for your table elements. You have missing </TD> and </TR> tags all over the code.

Every <TABLE>, <TR> and <TD> tag needs a closing </TABLE>, </TR> or </TD> tag to accompany it.
Tony
reddot.gif WIDTH=500 HEIGHT=2 VSPACE=3

 
Just use the nested tables, then experiment with 'width',
'align', 'colspan' attributes of the <td> and <table> tags
to achieve the required results.
Below is the example:

<table width=&quot;100%&quot;> <!-- Table for keep all the stuff together -->
<tr>
<td valign=&quot;top&quot;>
<table> <!-- Internal table for holding the left column -->
<tr>
<td>
<table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;
width=&quot;110&quot;>
<tr><td>
!!! Insert Left-Upper table here !!!
</td></tr>
</table>
</td>
</tr>
<tr>
<td>
<table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;
width=&quot;110&quot;>
<tr><td>
!!! Insert Left-Lower table here !!!
</td></tr>
</table>
</td>
</tr>
</table> <!-- End of the left internal table. -->
</td>
<td align=&quot;left&quot; width=&quot;100%&quot; valign=&quot;top&quot;>
<table width=&quot;100%&quot;> <!-- Internal table for holding the center column -->
<tr>
<td align=&quot;left&quot; width=&quot;100%&quot;>
<table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; ALIGN=&quot;left&quot; width=&quot;70%&quot;>
<tr><td>
!!! Insert the Center-Upper table here !!!
</td></tr>
</table>
</td>
</tr>
<tr>
<td align=&quot;left&quot; width=&quot;100%&quot;>
<table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; ALIGN=&quot;left&quot; width=&quot;70%&quot;>
<tr><td>
!!! Insert the Center-Middle table here !!!
</td></tr>
</table>
</td>
</tr>
<tr>
<td align=&quot;left&quot; width=&quot;100%&quot;>
<table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; ALIGN=&quot;left&quot; width=&quot;70%&quot;>
<tr><td>
!!! Insert the Center-Lower table here !!!
</td></tr>
</td>
</tr>
</table>
</td>
</tr>
</table>

Hope this helps
Grzegorz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top