View Full Version : Tables are messed up.. (using php includes)


marymaier1
07-12-2003, 09:46 PM
Here is the site (http://mary.watermellon.net/newlayout/index.php). As you can see, the right table and middle table (newsie & footer.php) are lower than they should be. Both should be level with top of the left menu. I'm using php includes, so here are the files you might need to look at (view source):
left.php (http://mary.watermellon.net/newlayout/left.php)
right.php (http://mary.watermellon.net/newlayout/right.php)
And since you can't see the index.php by its self, here's the code:

<html>
<head>
<title>Watermellon</title>
</head>
<body bgcolor="#ffffff" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" valign="top">
<tr>
<?php include ("left.php"); ?>
<td colspan="2" valign="top"><p align="right">
</td>
<?php include ("right.php"); ?>
<td valign="top"><p align="right">
</tr>
<p align="center">
newsie
<?php include ("footer.php"); ?>
<td valign="top"><p align="center">
</center>
<tr>
<td height="1"></td>
<td width="100%"></td>
<td width="139"></td>
<td></td>
</tr>
</table>
</body>
</html>

So.. does anyone know how this can be fixed?

alkaline39
07-12-2003, 10:06 PM
You have to put the includes into the td tag



<html>
<head>
<title>Watermellon</title>
</head>
<body bgcolor="#ffffff" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" valign="top">
<tr>

<td colspan="2" valign="top"><p align="right">
<?php include ("left.php"); ?></p></td>

<td valign="top"><p align="right">
<?php include ("right.php"); ?></p></td></tr>

<tr>
<td valign="top"><p align="center">
newsie
<?php include ("footer.php"); ?></p></td></tr>

<tr>
<td height="1"></td>
<td width="100%"></td>
<td width="139"></td>
<td></td>
</tr>
</table>
</body>
</html>



try that it should work

marymaier1
07-12-2003, 10:49 PM
No.. see: http://mary.watermellon.net/newlayout/index.php
but I might have to take out the td's in the right/left.php?

MaGiCSuN
07-12-2003, 10:52 PM
this part:

<td height="1"></td>
<td width="100%"></td>
<td width="139"></td>


doesn't show up, unless you add something to it. So if you are going to leave them blank, you could just delete them too because they don't show up anywayz. Try it with a test table if you want. Adding nothing in a table (also if you set border to black) will make the table not show up

Love,
Mirna

marymaier1
07-12-2003, 11:38 PM
Ok, I took that out. I created a separate header file, so now its working! Thanks everyone =)