View Full Version : Multiple table mess


willworkforchoc
06-30-2003, 11:27 PM
I've got tables on both sides but they are not lined up. HELP!
Code:
<table><tr><td valign="top">

<table border="1"><tr><td>
Teachers
</td></tr></table><td valign="top">
Welcome to my site. I hope that you enjoy your stay.
</td><td valign="top">

<table border="1"><tr><td>
Family
</td></tr></table><br>
<table><tr><td valign="top">

<table border="1"><tr><td>
Students
</td></tr></table>

</td><td valign="top">

This is a Grade 1/2 Class.
</td><td valign="right">

<table border="1"><tr><td>
Faith
</td></tr></table>

</td></tr></table><br>
<table><tr><td valign="top">

<table border="1"><tr><td>
Parents
</td></tr></table>

</td><td valign="top">

Our School is located in Langley, BC</td><td valign="top">

<table border="1"><tr><td>
Miscellaneous
</td></tr></table><br>

or you can see the testpage at

http://www.geocities.com/laharold2003/testtable.html
Thanks

willworkforchoc
06-30-2003, 11:29 PM
Sorry, that should read...
http://www.geocities.com/laharold2003/tabletest.html

amicus
07-01-2003, 12:19 AM
gosh i don't know what you need all those tables for but you might want to get rid of some of them. you just didn't close some of your 'table', 'tr' and 'td' tags. also if you format the code it'll be easier to read :).

<html>
<head>
<title>Untitled</title>
</head>

<body>
<table>
<tr>
<td valign="top">
<table border="1">
<tr>
<td>Teachers</td>
</tr>
</table>
</td>
<td valign="top">Welcome to my site. I hope that you enjoy your stay.</td>
<td valign="top">
<table border="1">
<tr>
<td>Family</td>
</tr>
</table>
<br>

<table>
<tr>
<td valign="top">
<table border="1">
<tr>
<td>Students</td>
</tr>
</table>
</td>
<td valign="top">This is a Grade 1/2 Class.</td>
<td valign="right">
<table border="1">
<tr>
<td>Faith</td>
</tr>
</table>
</td>
</tr>
</table>
<br>

<table>
<tr>
<td valign="top">
<table border="1">
<tr>
<td>Parents</td>
</tr>
</table>
</td>
<td valign="top">Our School is located in Langley, BC</td>
<td valign="top">
<table border="1">
<tr>
<td>Miscellaneous</td>
</tr>
</table>
<br>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>

willworkforchoc
07-01-2003, 04:13 AM
What do you mean by format? Also, would you have a better idea, the problem is that I have so many pages/links and I find the one table I've got is too long.

amicus
07-01-2003, 04:26 PM
if there's nothing you can do about the long tables then you can't do anything about it. that's just the design that's all. i use plenty of table too :)

format just indent the code, every tag that's inside of another tag is gets indented. it makes it easier to read so finding mistakes is alot easier. also if you forgot to close a tag you'll know right away.

my way of doing it is to make the opening tag then immediately close it that way i never forget. for example i'll open and close and 'html' tag then go back and open and close a 'head' tag then do the same for 'body'. i use the same technique for 'tables', 'tr', 'td' and any other tag that needs to be closed.

step 1
<html>
</html>

step 2
<html>
<head>
</head>
</html>

step 3
<html>
<head>
</head>

<body>
</body>
</html>

step 4
<html>
<head>
</head>

<body>
<table>
</table>
</body>
</html>

step 5
<html>
<head>
</head>

<body>
<table>
<tr>
</tr>
</table>
</body>
</html>

step 6
<html>
<head>
</head>

<body>
<table>
<tr>
<td></td>
</tr>
</table>
</body>
</html>

willworkforchoc
07-01-2003, 08:45 PM
I appreciate the explanation. Many of my pages have errors on them. I should be able to find them easier this way.

Thanks again!