Credit Cards - Internet Advertising - Personal Loans - Online Loans - Montana Music

PDA

View Full Version : messed up tables?


izlik
Jan 14th 2008, 10:32 am
hello, i have this code bellow where i have 3 tables within another table

my problem is that the tables for the included files recent_1.php recent_2.php recent_3.php get's totaly messed up when i try to center them, and i wonder if someone can help

what is get right now is that the line up under eachother

recent_1.php
recent_2.php
recent_3.php

and i want them centerd like this on the same row,

recent_1.php recent_2.php recent_3.php

i hope that someone can help

<html>

<body>

<table border="1" cellpadding="0" cellspacing="0" width="952" height="952" bgcolor="#FFFFFF">
<tr>
<td valign="top" height="146">
<!-- MSCellType="ContentHead2" -->
<center><b>&nbsp;</center><br><cebter><span style="font-size: 15pt; font-weight: 700; text-decoration: underline"><center>
&nbsp;</center></font><br><?
include 'includes/featuredlist.php'; ?></td>
</tr>
<tr>
<td valign="top" width="283">
<!-- MSCellType="ContentBody" -->
<table border="1" width="33%" bgcolor="#FFFFFF" align="center">

<td><?
include 'includes/recent_1.php'; ?></td>

</table>
<table border="1" width="33%" bgcolor="#FFFFFF" align="center">

<td><?
include 'includes/recent_2.php'; ?></td>

</table>
<table border="1" width="33%" bgcolor="#FFFFFF" align="center">

<td><?
include 'includes/recent_3.php'; ?></td>

</table>
</td>
</table>

</body>

</html>

unitedlocalbands
Jan 14th 2008, 10:14 pm
You could first try changing all you table atributes to style tags.

Like this



<html>
<body>
<table style="width:952; height:952; background-color:#FFFFFF; border:1px;" cellpadding="0" cellspacing="0" >
<tr>
<td style="vertical-align:top; width:146px;">
<!-- MSCellType="ContentHead2" -->
<center><b>&nbsp;</b></center><br/>
<center><span style="font-size:15pt; font-weight:700px; text-decoration:underline;"></span></center>
<center>&nbsp;</center><br/>
<?include 'includes/featuredlist.php'; ?>
</td>
</tr>
<tr>
<td style="vertical-align:top; width:283px;">
<!-- MSCellType="ContentBody" -->
<table style="border:1px; width:33%; background-color:#FFFFFF; text-align:center;">
<tr>
<td><?include 'includes/recent_1.php'; ?></td>
</tr>
</table>
<table style="border:1px; width:33%; background-color:#FFFFFF; text-align:center;">
<tr>
<td><?include 'includes/recent_2.php'; ?></td>
</tr>
</table>
<table style="border:1px; width:33%; background-color:#FFFFFF; text-align:center;">
<tr>
<td><?include 'includes/recent_3.php'; ?></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>


I also found some missing end tags and some missing <tr> tags which are needed by the table to build a row.

You should always specify what units you would like when you set a width or height;

Like 33px; or 33% dont leave it up to the browser to decied because they will all pick something different.

I hope this help and doesnt make it worst.

If you want these tables to be next to eachother just get rid of a couple of the table tags like this


<html>
<body>
<table style="width:952; height:952; background-color:#FFFFFF; border:1px;" cellpadding="0" cellspacing="0" >
<tr>
<td style="vertical-align:top; width:146px;">
<!-- MSCellType="ContentHead2" -->
<center><b>&nbsp;</b></center><br/>
<center><span style="font-size:15pt; font-weight:700px; text-decoration:underline;"></span></center>
<center>&nbsp;</center><br/>
<?include 'includes/featuredlist.php'; ?>
</td>
</tr>

<tr>
<td style="vertical-align:top; width:283px;">
<!-- MSCellType="ContentBody" -->
<table style="border:1px; width:33%; background-color:#FFFFFF; text-align:center;">
<tr>
<td><?include 'includes/recent_1.php'; ?></td>

<td><?include 'includes/recent_2.php'; ?></td>

<td><?include 'includes/recent_3.php'; ?></td>

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

unitedlocalbands
Jan 15th 2008, 7:10 am
After reviewing my last post I see that I did forget to put px after a width atribute in the first line. Be sure to fix that before you use these tables.

largn81
Jan 26th 2008, 5:40 pm
Thanks a lot, ;) :) it is what i was looking for