View Full Version : How can I get my tables to line up with my header?


pinkglamour
03-02-2005, 11:49 PM
Click (http://freewebs.com/simology)

theres my layout

Monkey Bizzle
03-03-2005, 12:31 AM
I think that you are a little confused about how tags work. You are closing them in the wrong order. You have for example:

<tr><td>some stuff here</tr></td>

You need to close the last tag that was opened first so the above should be:

<tr><td>some stuff here</td></tr>

Also, at the very end of your code, you didn't close the row tag. Once I did that, it fixed your problem, but... Your table still appears to be not aligned because your image isn't as wide as your table is. I added a border around the entire table so you could see that it was fixed. I also fixed some other errors in your coding. Like, you had so many <center> tags but no </center> tags... Here is your corrected coding. Make sure you remove my comments in red.

<html>
<head>

<title>simology</title>

</head>
<body>
<center>
<table border="1" cellpadding="5" cellspacing="0" width="500">
Change this 1 back to a 0 to get rid of the borders... I did that so you could see when you copy this code that the table is in fact correct now...

<tr>
<td colspan="2">
<center>
<img src="http://www.freewebs.com/simology/simheader.jpg">
</center>

You could add center tags around the image to center it so it looks more aligned, but to make it go the same width as the rest of your table, you have to just make the image bigger. If you don't want to center it, then remove those red <center> tags.
</td>
</tr>

<tr>
<td width="350" valign="top">
If you don't put valign="top" in this cell here, then your table will stay centered in the cell.

<table width="350" cellspacing="1">
<tr>
<td style="border: 1px solid #000000;" bgcolor="#FFFFFF">
<center>The Content</center>
</td>
</tr>

<tr>
<td style="border: 1px solid #000000;" bgcolor="#FFFFFF">
<center> I'm just getting started. Please E-mail or IM me on what to put on this site or what you would like to see. Thank

you.</center>
</td>
</tr>
</table>

</td>

<td width="150" valign="center">
<table width="150" cellspacing="1">
<tr>
<td style="border: 1px solid #000000;" bgcolor="#FFFFFF">
<center>
NAVIGATION
</center>
</td></tr>

<tr><td style="border: 1px solid #000000;" bgcolor="#FFFFFF">
<center>Welcome to Simology. A Sims 2 fansite. </center>
</td></tr>

<tr><td style="border: 1px solid #000000;" bgcolor="#FFFFFF">
<center>Information

Name:Simology
WebMistress:Brittany</center>
</td></tr>

<tr><td style="border: 1px solid #000000;" bgcolor="#FFFFFF">
<center>Content
<br>
<a href="http://www.freewebs.com/simology/freebies.htm">Freebies</a>
</center>
</td></tr>

<tr><td style="border: 1px solid #000000;" bgcolor="#FFFFFF">
<center>Other Sites
<br>
<a href="http://geocities.com/xpinkxicex/">Pink Ice</a></center>
</td></tr>

<tr><td style="border: 1px solid #000000;" bgcolor="#FFFFFF">
<center>Contact Me
<br>
E-mail:xpinkxicex@yahoo.com
<br>
AIM:xwithoutu
<br>
YIM:britt_kchs_2007
</center>
</td></tr>
</table>

</td>
</tr>

</table>

</body>
</html>