MasterACE14 Posted September 22, 2007 Share Posted September 22, 2007 Morning Everyone, My Tables aren't center aligning on my website, they are centered, but completely centered and lined up with each other. They seem to change how they are centered depending on the surfers screen resolution. I don't know why? here's the link to the page: http://www.crikeygames.com.au/conflictingforces/index.php?page=progress and here's the pages code(note their is some PHP): <div id = "progress"> <center><b><u>Progress</u></b><br></center><br> <?php // loop through records writing a table for each one while ( $row = mysql_fetch_array( $rs ) ) { ?> <table align="center" valign="middle" 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> <?php } ?> </div> Regards ACE Quote Link to comment Share on other sites More sharing options...
pocobueno1388 Posted September 23, 2007 Share Posted September 23, 2007 I've never seen the word "middle" before like you use it: valign="middle" That should be "center". Post the CSS code to the "fix" class. Quote Link to comment Share on other sites More sharing options...
MasterACE14 Posted September 23, 2007 Author Share Posted September 23, 2007 /* XXXXXXXXXXXXXX table properties XXXXXXXXXXXXXXXXXX */ /* set table properties */ table { border: 1px solid green; text-align: center } td { border: 1px solid lime; background: black } /* set table width and margin */ table { width: 500px ; caption-side: top; margin-bottom: 20px } /* compute column widths regardless of cell content */ table.fix { table-layout: fixed } /* XXXXXXXXXXXXXXXXX table properties XXXXXXXXXXXXXXXX */ Quote Link to comment Share on other sites More sharing options...
MasterACE14 Posted September 25, 2007 Author Share Posted September 25, 2007 bump Quote Link to comment Share on other sites More sharing options...
MasterACE14 Posted September 27, 2007 Author Share Posted September 27, 2007 anyone got any idea's why the tables aren't aligning properly? Quote Link to comment Share on other sites More sharing options...
teng84 Posted September 28, 2007 Share Posted September 28, 2007 use margin: auto; Quote Link to comment Share on other sites More sharing options...
MasterACE14 Posted September 29, 2007 Author Share Posted September 29, 2007 that made it worse :-\ Quote Link to comment Share on other sites More sharing options...
noobstar Posted October 2, 2007 Share Posted October 2, 2007 I think its because the Navigation Panel pushes the first 2 tables to the right while the other 3 are pushed by the left side panel to the left while the rest of them align properly into the center. Best thing to do is chuck all your panels into a big table and then in the middle area you can have a loop of news tables as you have now. This should make everything align properly. Here is what i mean: Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.