Jump to content

Tables Centered, but not Lined up!


MasterACE14

Recommended Posts

Evening Folks,

 

can someone check this page on my website? http://www.crikeygames.com.au/conflictingforces/index.php?page=progress to me the 2 box's don't completely line up vertical, although their both centered.

 

heres the CSS for it:

/* set table properties for progress.php */
table { border: 1px solid green; text-align: center }
td { border: 1px solid lime; background: black }

/* set table width and margin for progress.php */
table { width: 400px ; caption-side: top;
            margin-bottom: 20px           }

/* compute column widths regardless of cell content */
table.fix { table-layout: fixed }

 

here's progress.php:

<?php

// loop through records writing a table for each one
while ( $row = mysql_fetch_array( $rs ) )
{

?>



<center>
<table class = "fix">
<tr>
<td><b><?php echo $row["author"]; ?></b></td>

<?php // workout the post date

$datetime = $row["posttime"];
$year = substr( $datetime, 0, 4 );
$mon = substr( $datetime, 4, 2 );
$day = substr( $datetime, 6, 2 );
$hour = substr( $datetime, 8, 2 );
$min = substr( $datetime, 10, 2 );
$sec = substr( $datetime, 12, 2 );
$orgdate = date("F j, Y",
mktime( $hour, $min, $sec, $mon, $day, $year ) );

?>
<td><b><?php echo date("F j, Y", strtotime($datetime)); ?></b></td>
</tr>


<tr><td colspan="2">
<?php echo $row["text"]; ?>
</td></tr>
</table>
<br>
</center>

<?php } ?>
</div>

 

Regards ACE

Link to comment
https://forums.phpfreaks.com/topic/69467-tables-centered-but-not-lined-up/
Share on other sites

I refuse to help you because the layout is soo bad. - You might as well scrap it and start over. Seriously that looks disgusting. Yellow and bright green? Somer crazy links, and uninteresting pictures.

 

What has happended to the world?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.