twilitegxa Posted September 18, 2008 Share Posted September 18, 2008 Is there a way to make my last table display beside the other two tables? Here is my sample page: http://www.webdesignsbyliz.com/sailormoonrpg/test.php And my code: <html> <head> <title></title> <link rel="stylesheet" type="text/css" href="simpletree2.css" /> </head> <?php $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); }mysql_select_db("smrpg", $con); //get Sailor Moon's data from the "scout" table $result = mysql_query("SELECT * FROM scout where identity = 'Sailor Moon'") or die(mysql_error()); $row = mysql_fetch_array( $result ); $birthdatemonth = $row["birthdatemonth"]; $birthdateday = $row["birthdateday"]; $birthdateyear = $row["birthdateyear"]; $birthdate = $birthdatemonth . " " . $birthdateday . ", ". $birthdateyear; $identity = $row["identity"]; echo "<h1><center>$identity</center></h1>"; echo "<table border='0' width='100%'>"; // keeps getting the next row until there are no more to get echo "<tr><td width='25%'>"; echo "<b>Name:</b></td><td>"; echo $row['charactername']; echo "</td></tr><tr><td>"; echo "<b>Element Of Influence:</b></td><td>"; echo $row['elementofinfluence']; echo "</td></tr><tr><td>"; echo "<b>Age:</b></td><td>"; echo $row['age']; echo "</td></tr><tr><td>"; echo "<b>Birthdate:</b></td><td>"; echo $birthdate; echo "</td></tr><tr><td>"; echo "<b>Height:</b></td><td>"; echo $row['heightfeet']; echo "' " ; echo $row['heightinches']; echo """; echo "</td></tr><tr><td>"; echo "<b>Blood Type:</b></td><td>"; echo $row['bloodtype']; echo "</td></tr><tr><td>"; echo "<b>Hobbies:</b></td><td>"; echo $row['hobbies']; echo "</td></tr><tr><td>"; echo "<b>Favorite Color:</b></td><td>"; echo $row['favoritecolor']; echo "</td></tr><tr><td>"; echo "<b>Favorite Gemstone:</b></td><td>"; echo $row['favoritegemstone']; echo "</td></tr><tr><td>"; echo "<b>Favorite Food:</b></td><td>"; echo $row['favoritefood']; echo "</td></tr><tr><td>"; echo "<b>Least Favorite Food:</b></td><td>"; echo $row['leastfavoritefood']; echo "</td></tr><tr><td>"; echo "<b>Favorite School Subject:</b></td><td>"; echo $row['favoriteschoolsubject']; echo "</td></tr><tr><td>"; echo "<b>Least Favorite School Subject:</b></td><td>"; echo $row['leastfavoriteschoolsubject']; echo "</td></tr><tr><td>"; echo "<b>Strengths:</b></td><td>"; echo $row['strengths']; echo "</td></tr><tr><td>"; echo "<b>Weaknesses:</b></td><td>"; echo $row['weaknesses']; echo "</td></tr><tr><td>"; echo "<b>Goal:</b></td><td>"; echo $row['goal']; echo "..."; echo "</td></tr></table><p>"; echo $row['biography']; echo "</p>"; echo "</td></tr>"; echo "<tr><td> </td></tr>"; echo "</table>"; $result = mysql_query("SELECT * FROM stats where identity = 'Sailor Moon'") or die(mysql_error()); $row = mysql_fetch_array( $result ); echo "<table border='0' width='40%' id='stats'>"; // keeps getting the next row until there are no more to get echo "<tr><td colspan='3' id='th'>Stats And Derived Values</td></tr>"; echo "<tr><td>"; echo "<b>Body:</b></td><td col class='right'>"; echo $row['body']; echo "</td></tr><tr><td>"; echo "<b>Mind:</b></td><td col class='right'>"; echo $row['mind']; echo "</td></tr><tr><td>"; echo "<b>Soul:</b></td><td col class='right'>"; echo $row['soul']; echo "</td></tr><tr><td>"; echo " </td></tr><tr><td>"; echo "<b>Health Points:</b></td><td col class='right'>"; echo $row['health']; echo "</td></tr><tr><td>"; echo "<b>Energy Points:</b></td><td col class='right'>"; echo $row['energy']; echo "</td></tr><tr><td>"; echo "<b>Attack Combat Value:</b></td><td col class='right'>"; echo $row['acv']; echo "<td col class='right'>"; echo " ("; echo $row['acv_sa']; echo " for Sailor Scout Attack)"; echo "</td>"; echo "</td></tr><tr><td >"; echo "<b>Defense Combat Value:</b></td><td col class='right'>"; echo $row['dcv']; echo "<td col class='right'>"; echo " ("; echo $row['dcv_sa']; echo " for Sailor Scout Attack)"; echo "</td>"; echo "</td></tr><tr><td>"; echo "<b>Total Character Points:</b></td><td col class='right'>"; echo $row['tcp']; echo "</td></tr>"; echo "</table>"; $result = mysql_query("SELECT * FROM character_defects where identity = 'Sailor Moon' ORDER BY defect_id ASC") or die(mysql_error()); $row = mysql_fetch_array( $result ); echo "<table border='0' width='40%' id='stats'>"; echo "<tr><td colspan='3' id='th'>Character Defects</td></tr>"; // keeps getting the next row until there are no more to get while($row = mysql_fetch_array( $result )) { echo "<tr><td>"; echo $row['defect_id']; echo " "; echo $row['desc']; echo "</td><td>"; echo $row['bp']; echo " BP"; echo "</td></tr>"; } echo "</table>"; $result = mysql_query("SELECT * FROM character_attributes ORDER BY attribute_id ASC") or die(mysql_error()); $row = mysql_fetch_array( $result ); echo "<table border='0' width='40%' id='stats'>"; echo "<tr><td colspan='7' id='th'>Character Attributes And Sub-Attributes</td></tr>"; echo "<tr class='sub'><td>Attribute/Sub-Attribute</td><td colspan='3' align='center'>Level</td><td colspan='3' align='center'>Points</td></tr>"; echo "<tr><td></td></tr>"; // keeps getting the next row until there are no more to get while($row = mysql_fetch_array( $result )) { echo "<tr><td>"; echo $row['attribute_id']; echo " "; echo $row['desc']; echo "</td><td width='2%'> </td><td width='1%' align='right'>"; echo $row['level']; echo "</td><td width='2%'> </td><td width='2%'> </td><td width='1%' align='right'>"; echo $row['points']; echo "</td><td width='2%'> </td></tr>"; } echo "</table>"; Quote Link to comment Share on other sites More sharing options...
dropfaith Posted September 18, 2008 Share Posted September 18, 2008 just make a table that contains them <table> <tr> <td> table 1 table 2 left side </td> <td>Table 3 you want on right side </td> </tr> </table> Quote Link to comment Share on other sites More sharing options...
twilitegxa Posted September 18, 2008 Author Share Posted September 18, 2008 I tried that, but it didn't seem to work. Is there some specific place I need to put the code for the new table? Quote Link to comment Share on other sites More sharing options...
twilitegxa Posted September 18, 2008 Author Share Posted September 18, 2008 My table doesn't seem wide enough to allow the tables inside to fit appropriately and adjusting the widht of the td didn't seem to change anything. Quote Link to comment Share on other sites More sharing options...
twilitegxa Posted September 18, 2008 Author Share Posted September 18, 2008 I tried adjusting the widths, but I can't get the second half to line up right. http://www.webdesignsbyliz.com/sailormoonrpg/test.php Quote Link to comment Share on other sites More sharing options...
dropfaith Posted September 18, 2008 Share Posted September 18, 2008 it would be something like this based on what i see you just need to nest the tables like below <table width="100%"> <tr> <td class="left side tables> <table Stats And Derived Values> data here <table Character Defects>here </td> <td right side tables > <table Character Attributes And Sub-Attributes table would go here </td> </tr> </table> Quote Link to comment Share on other sites More sharing options...
F1Fan Posted September 18, 2008 Share Posted September 18, 2008 Have you gotten this working yet? I looked at the page, and I think you need to decide what percentage of the width you want each table to take up on the page. Then do something similar to what dropfaith's example, like this: <table width="100%"> <tr> <td width="50%" align="center" valign="top"> <!-- Your first table (left) here --> </td> <td width="50%" align="center" valign="top"> <!-- Your second table (right) here --> </td> </tr> </table> If you want them to appear center aligned on the page, alight the left one "right" and the right one "left." But that would only work if you keep the 50/50 split. Quote Link to comment Share on other sites More sharing options...
dropfaith Posted September 18, 2008 Share Posted September 18, 2008 nah i think css works way better centering things with margin:0 auto; set on the main table// then go 50 /50 Quote Link to comment Share on other sites More sharing options...
twilitegxa Posted September 18, 2008 Author Share Posted September 18, 2008 Well, here's the code I have for it so far: $result = mysql_query("SELECT * FROM stats where identity = 'Sailor Moon'") or die(mysql_error()); $row = mysql_fetch_array( $result ); echo "<table><tr><td width='80%'>"; echo "<table border='0' width='50%' id='stats'>"; // keeps getting the next row until there are no more to get echo "<tr><td colspan='3' id='th'>Stats And Derived Values</td></tr>"; echo "<tr><td>"; echo "<b>Body:</b></td><td col class='right'>"; echo $row['body']; echo "</td></tr><tr><td>"; echo "<b>Mind:</b></td><td col class='right'>"; echo $row['mind']; echo "</td></tr><tr><td>"; echo "<b>Soul:</b></td><td col class='right'>"; echo $row['soul']; echo "</td></tr><tr><td>"; echo " </td></tr><tr><td>"; echo "<b>Health Points:</b></td><td col class='right'>"; echo $row['health']; echo "</td></tr><tr><td>"; echo "<b>Energy Points:</b></td><td col class='right'>"; echo $row['energy']; echo "</td></tr><tr><td>"; echo "<b>Attack Combat Value:</b></td><td col class='right'>"; echo $row['acv']; echo "<td col class='right'>"; echo " ("; echo $row['acv_sa']; echo " for Sailor Scout Attack)"; echo "</td>"; echo "</td></tr><tr><td >"; echo "<b>Defense Combat Value:</b></td><td col class='right'>"; echo $row['dcv']; echo "<td col class='right'>"; echo " ("; echo $row['dcv_sa']; echo " for Sailor Scout Attack)"; echo "</td>"; echo "</td></tr><tr><td>"; echo "<b>Total Character Points:</b></td><td col class='right'>"; echo $row['tcp']; echo "</td></tr>"; echo "</table>"; $result = mysql_query("SELECT * FROM character_defects where identity = 'Sailor Moon' ORDER BY defect_id ASC") or die(mysql_error()); $row = mysql_fetch_array( $result ); echo "<table border='0' width='50%' id='stats'>"; echo "<tr><td colspan='3' id='th'>Character Defects</td></tr>"; // keeps getting the next row until there are no more to get while($row = mysql_fetch_array( $result )) { echo "<tr><td>"; echo $row['defect_id']; echo " "; echo $row['desc']; echo "</td><td>"; echo $row['bp']; echo " BP"; echo "</td></tr>"; } echo "</table>"; echo "</td><td>"; $result = mysql_query("SELECT * FROM character_attributes ORDER BY attribute_id ASC") or die(mysql_error()); $row = mysql_fetch_array( $result ); echo "<table border='0' width='40%' id='stats'>"; echo "<tr><td colspan='7' id='th'>Character Attributes And Sub-Attributes</td></tr>"; echo "<tr class='sub'><td>Attribute/Sub-Attribute</td><td colspan='3' align='center'>Level</td><td colspan='3' align='center'>Points</td></tr>"; echo "<tr><td></td></tr>"; // keeps getting the next row until there are no more to get while($row = mysql_fetch_array( $result )) { echo "<tr><td>"; echo $row['attribute_id']; echo " "; echo $row['desc']; echo "</td><td width='2%'> </td><td width='1%' align='right'>"; echo $row['level']; echo "</td><td width='2%'> </td><td width='2%'> </td><td width='1%' align='right'>"; echo $row['points']; echo "</td><td width='2%'> </td></tr>"; } echo "</table>"; echo "</td></tr></table>"; I can't get the right side adjusted. Everything I try doesn't work. What am I doing wrong? Quote Link to comment Share on other sites More sharing options...
F1Fan Posted September 18, 2008 Share Posted September 18, 2008 Try this: <?php $result = mysql_query("SELECT * FROM stats where identity = 'Sailor Moon'") or die(mysql_error()); $row = mysql_fetch_array( $result ); echo "<table><tr><td width='80%' align='right' valign='top'>"; // added align='right' valign='top' echo "<table border='0' width='50%' id='stats'>"; // keeps getting the next row until there are no more to get echo "<tr><td colspan='3' id='th'>Stats And Derived Values</td></tr>"; echo "<tr><td>"; echo "<b>Body:</b></td><td col class='right'>"; echo $row['body']; echo "</td></tr><tr><td>"; echo "<b>Mind:</b></td><td col class='right'>"; echo $row['mind']; echo "</td></tr><tr><td>"; echo "<b>Soul:</b></td><td col class='right'>"; echo $row['soul']; echo "</td></tr><tr><td>"; echo " </td></tr><tr><td>"; echo "<b>Health Points:</b></td><td col class='right'>"; echo $row['health']; echo "</td></tr><tr><td>"; echo "<b>Energy Points:</b></td><td col class='right'>"; echo $row['energy']; echo "</td></tr><tr><td>"; echo "<b>Attack Combat Value:</b></td><td col class='right'>"; echo $row['acv']; echo "</td><td col class='right'>"; // added </td> echo " ("; echo $row['acv_sa']; echo " for Sailor Scout Attack)"; echo "</td>"; echo "</td></tr><tr><td >"; echo "<b>Defense Combat Value:</b></td><td col class='right'>"; echo $row['dcv']; echo "</td><td col class='right'>"; // added </td> echo " ("; echo $row['dcv_sa']; echo " for Sailor Scout Attack)"; //echo "</td>"; // that's an extra one echo "</td></tr><tr><td>"; echo "<b>Total Character Points:</b></td><td col class='right'>"; echo $row['tcp']; echo "</td></tr>"; echo "</table>"; $result = mysql_query("SELECT * FROM character_defects where identity = 'Sailor Moon' ORDER BY defect_id ASC") or die(mysql_error()); $row = mysql_fetch_array( $result ); echo "<table border='0' width='50%' id='stats'>"; echo "<tr><td colspan='3' id='th'>Character Defects</td></tr>"; // keeps getting the next row until there are no more to get while($row = mysql_fetch_array( $result )) { echo "<tr><td>"; echo $row['defect_id']; echo " "; echo $row['desc']; echo "</td><td>"; echo $row['bp']; echo " BP"; echo "</td></tr>"; } echo "</table>"; echo "</td><td>"; $result = mysql_query("SELECT * FROM character_attributes ORDER BY attribute_id ASC") or die(mysql_error()); $row = mysql_fetch_array( $result ); echo "</td><td align='right' valign='top'>"; // added this whole line echo "<table border='0' width='40%' id='stats'>"; echo "<tr><td colspan='7' id='th'>Character Attributes And Sub-Attributes</td></tr>"; echo "<tr class='sub'><td>Attribute/Sub-Attribute</td><td colspan='3' align='center'>Level</td><td colspan='3' align='center'>Points</td></tr>"; echo "<tr><td></td></tr>"; // keeps getting the next row until there are no more to get while($row = mysql_fetch_array( $result )) { echo "<tr><td>"; echo $row['attribute_id']; echo " "; echo $row['desc']; echo "</td><td width='2%'> </td><td width='1%' align='right'>"; echo $row['level']; echo "</td><td width='2%'> </td><td width='2%'> </td><td width='1%' align='right'>"; echo $row['points']; echo "</td><td width='2%'> </td></tr>"; } echo "</table>"; echo "</td></tr></table>"; ?> Quote Link to comment Share on other sites More sharing options...
twilitegxa Posted September 18, 2008 Author Share Posted September 18, 2008 Still didn't work. It just made the tables on the left move to the right, next to the other table on the right. I need to get the table on the right adjusted so that it is spaced out better. Quote Link to comment Share on other sites More sharing options...
F1Fan Posted September 18, 2008 Share Posted September 18, 2008 Take two? <?php $result = mysql_query("SELECT * FROM stats where identity = 'Sailor Moon'") or die(mysql_error()); $row = mysql_fetch_array( $result ); echo "<table width='100%' valign='top'><tr><td width='50%' align='right' valign='top'>"; // added align='right' valign='top' echo "<table border='0' id='stats' align='right'>"; // keeps getting the next row until there are no more to get echo "<tr><td colspan='3' id='th'>Stats And Derived Values</td></tr>"; echo "<tr><td>"; echo "<b>Body:</b></td><td col class='right'>"; echo $row['body']; echo "</td></tr><tr><td>"; echo "<b>Mind:</b></td><td col class='right'>"; echo $row['mind']; echo "</td></tr><tr><td>"; echo "<b>Soul:</b></td><td col class='right'>"; echo $row['soul']; echo "</td></tr><tr><td>"; echo " </td></tr><tr><td>"; echo "<b>Health Points:</b></td><td col class='right'>"; echo $row['health']; echo "</td></tr><tr><td>"; echo "<b>Energy Points:</b></td><td col class='right'>"; echo $row['energy']; echo "</td></tr><tr><td>"; echo "<b>Attack Combat Value:</b></td><td col class='right'>"; echo $row['acv']; echo "</td><td col class='right'>"; // added </td> echo " ("; echo $row['acv_sa']; echo " for Sailor Scout Attack)"; echo "</td>"; echo "</td></tr><tr><td >"; echo "<b>Defense Combat Value:</b></td><td col class='right'>"; echo $row['dcv']; echo "</td><td col class='right'>"; // added </td> echo " ("; echo $row['dcv_sa']; echo " for Sailor Scout Attack)"; //echo "</td>"; // that's an extra one echo "</td></tr><tr><td>"; echo "<b>Total Character Points:</b></td><td col class='right'>"; echo $row['tcp']; echo "</td></tr>"; echo "</table>"; $result = mysql_query("SELECT * FROM character_defects where identity = 'Sailor Moon' ORDER BY defect_id ASC") or die(mysql_error()); $row = mysql_fetch_array( $result ); echo "<table border='0' width='50%' id='stats'>"; echo "<tr><td colspan='3' id='th'>Character Defects</td></tr>"; // keeps getting the next row until there are no more to get while($row = mysql_fetch_array( $result )) { echo "<tr><td>"; echo $row['defect_id']; echo " "; echo $row['desc']; echo "</td><td>"; echo $row['bp']; echo " BP"; echo "</td></tr>"; } echo "</table>"; echo "</td><td>"; $result = mysql_query("SELECT * FROM character_attributes ORDER BY attribute_id ASC") or die(mysql_error()); $row = mysql_fetch_array( $result ); echo "</td><td valign='top' width='50%'>"; // added this whole line echo "<table border='0' id='stats' align='left'>"; echo "<tr><td colspan='7' id='th'>Character Attributes And Sub-Attributes</td></tr>"; echo "<tr class='sub'><td>Attribute/Sub-Attribute</td><td colspan='3' align='center'>Level</td><td colspan='3' align='center'>Points</td></tr>"; echo "<tr><td></td></tr>"; // keeps getting the next row until there are no more to get while($row = mysql_fetch_array( $result )) { echo "<tr><td>"; echo $row['attribute_id']; echo " "; echo $row['desc']; echo "</td><td width='2%'> </td><td width='1%' align='right'>"; echo $row['level']; echo "</td><td width='2%'> </td><td width='2%'> </td><td width='1%' align='right'>"; echo $row['points']; echo "</td><td width='2%'> </td></tr>"; } echo "</table>"; echo "</td></tr></table>"; ?> Quote Link to comment Share on other sites More sharing options...
twilitegxa Posted September 18, 2008 Author Share Posted September 18, 2008 Almost. Now they are aligned, but they are overlapping one of the tables lol http://www.webdesignsbyliz.com/sailormoonrpg/test.php Quote Link to comment Share on other sites More sharing options...
F1Fan Posted September 18, 2008 Share Posted September 18, 2008 Take three... <?php $result = mysql_query("SELECT * FROM stats where identity = 'Sailor Moon'") or die(mysql_error()); $row = mysql_fetch_array( $result ); echo "<table width='100%' valign='top'><tr><td width='50%' align='right' valign='top'>"; // added align='right' valign='top' echo "<table width='100%' border='0' id='stats' align='right'>"; // keeps getting the next row until there are no more to get echo "<tr><td colspan='3' id='th'>Stats And Derived Values</td></tr>"; echo "<tr><td>"; echo "<b>Body:</b></td><td col class='right'>"; echo $row['body']; echo "</td></tr><tr><td>"; echo "<b>Mind:</b></td><td col class='right'>"; echo $row['mind']; echo "</td></tr><tr><td>"; echo "<b>Soul:</b></td><td col class='right'>"; echo $row['soul']; echo "</td></tr><tr><td>"; echo " </td></tr><tr><td>"; echo "<b>Health Points:</b></td><td col class='right'>"; echo $row['health']; echo "</td></tr><tr><td>"; echo "<b>Energy Points:</b></td><td col class='right'>"; echo $row['energy']; echo "</td></tr><tr><td>"; echo "<b>Attack Combat Value:</b></td><td col class='right'>"; echo $row['acv']; echo "</td><td col class='right'>"; // added </td> echo " ("; echo $row['acv_sa']; echo " for Sailor Scout Attack)"; echo "</td>"; echo "</td></tr><tr><td >"; echo "<b>Defense Combat Value:</b></td><td col class='right'>"; echo $row['dcv']; echo "</td><td col class='right'>"; // added </td> echo " ("; echo $row['dcv_sa']; echo " for Sailor Scout Attack)"; //echo "</td>"; // that's an extra one echo "</td></tr><tr><td>"; echo "<b>Total Character Points:</b></td><td col class='right'>"; echo $row['tcp']; echo "</td></tr>"; echo "</table>"; $result = mysql_query("SELECT * FROM character_defects where identity = 'Sailor Moon' ORDER BY defect_id ASC") or die(mysql_error()); $row = mysql_fetch_array( $result ); echo "<table border='0' width='100%' id='stats'>"; echo "<tr><td colspan='3' id='th'>Character Defects</td></tr>"; // keeps getting the next row until there are no more to get while($row = mysql_fetch_array( $result )) { echo "<tr><td>"; echo $row['defect_id']; echo " "; echo $row['desc']; echo "</td><td>"; echo $row['bp']; echo " BP"; echo "</td></tr>"; } echo "</table>"; echo "</td><td>"; $result = mysql_query("SELECT * FROM character_attributes ORDER BY attribute_id ASC") or die(mysql_error()); $row = mysql_fetch_array( $result ); echo "</td><td valign='top' width='50%'>"; // added this whole line echo "<table width='100%' border='0' id='stats' align='left'>"; echo "<tr><td colspan='7' id='th'>Character Attributes And Sub-Attributes</td></tr>"; echo "<tr class='sub'><td>Attribute/Sub-Attribute</td><td colspan='3' align='center'>Level</td><td colspan='3' align='center'>Points</td></tr>"; echo "<tr><td></td></tr>"; // keeps getting the next row until there are no more to get while($row = mysql_fetch_array( $result )) { echo "<tr><td>"; echo $row['attribute_id']; echo " "; echo $row['desc']; echo "</td><td width='2%'> </td><td width='1%' align='right'>"; echo $row['level']; echo "</td><td width='2%'> </td><td width='2%'> </td><td width='1%' align='right'>"; echo $row['points']; echo "</td><td width='2%'> </td></tr>"; } echo "</table>"; echo "</td></tr></table>"; ?> Quote Link to comment Share on other sites More sharing options...
twilitegxa Posted September 18, 2008 Author Share Posted September 18, 2008 Wow. Now the tables on the left are totally overlapping each other! Quote Link to comment Share on other sites More sharing options...
F1Fan Posted September 18, 2008 Share Posted September 18, 2008 Really?!? It looks Ok to me... [attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
twilitegxa Posted September 18, 2008 Author Share Posted September 18, 2008 I wonder why it's messed up on my end? I'm using internet explorer to view. What browser are you using? And even if it's another, I need to fix the alignment in internet explorer anyway. I would do a screen shot, but I don't know how. I'm using a Mac. LOL Quote Link to comment Share on other sites More sharing options...
twilitegxa Posted September 18, 2008 Author Share Posted September 18, 2008 Yeah, it's just internet explorer. Looks fine in Firefox. Can you help me fix it for internet explorer? Quote Link to comment Share on other sites More sharing options...
F1Fan Posted September 18, 2008 Share Posted September 18, 2008 Yeah, looks like crap in IE on Windows, too. Can't believe you're using IE on a Mac, but it still needs to look right. Maybe this one: <?php $result = mysql_query("SELECT * FROM stats where identity = 'Sailor Moon'") or die(mysql_error()); $row = mysql_fetch_array( $result ); echo "<table width='100%' valign='top'><tr><td width='50%' align='right' valign='top'>"; // added align='right' valign='top' echo "<table width='100%' border='0' id='stats' align='right'>"; // keeps getting the next row until there are no more to get echo "<tr><td colspan='3' id='th'>Stats And Derived Values</td></tr>"; echo "<tr><td>"; echo "<b>Body:</b></td><td col class='right'>"; echo $row['body']; echo "</td></tr><tr><td>"; echo "<b>Mind:</b></td><td col class='right'>"; echo $row['mind']; echo "</td></tr><tr><td>"; echo "<b>Soul:</b></td><td col class='right'>"; echo $row['soul']; echo "</td></tr><tr><td>"; echo " </td></tr><tr><td>"; echo "<b>Health Points:</b></td><td col class='right'>"; echo $row['health']; echo "</td></tr><tr><td>"; echo "<b>Energy Points:</b></td><td col class='right'>"; echo $row['energy']; echo "</td></tr><tr><td>"; echo "<b>Attack Combat Value:</b></td><td col class='right'>"; echo $row['acv']; echo "</td><td col class='right'>"; // added </td> echo " ("; echo $row['acv_sa']; echo " for Sailor Scout Attack)"; echo "</td>"; echo "</td></tr><tr><td >"; echo "<b>Defense Combat Value:</b></td><td col class='right'>"; echo $row['dcv']; echo "</td><td col class='right'>"; // added </td> echo " ("; echo $row['dcv_sa']; echo " for Sailor Scout Attack)"; //echo "</td>"; // that's an extra one echo "</td></tr><tr><td>"; echo "<b>Total Character Points:</b></td><td col class='right'>"; echo $row['tcp']; echo "</td></tr>"; echo "</table><br>"; $result = mysql_query("SELECT * FROM character_defects where identity = 'Sailor Moon' ORDER BY defect_id ASC") or die(mysql_error()); $row = mysql_fetch_array( $result ); echo "<table border='0' width='100%' id='stats' align='right'>"; echo "<tr><td colspan='3' id='th'>Character Defects</td></tr>"; // keeps getting the next row until there are no more to get while($row = mysql_fetch_array( $result )) { echo "<tr><td>"; echo $row['defect_id']; echo " "; echo $row['desc']; echo "</td><td>"; echo $row['bp']; echo " BP"; echo "</td></tr>"; } echo "</table>"; echo "</td><td>"; $result = mysql_query("SELECT * FROM character_attributes ORDER BY attribute_id ASC") or die(mysql_error()); $row = mysql_fetch_array( $result ); echo "</td><td valign='top' width='50%'>"; // added this whole line echo "<table width='100%' border='0' id='stats' align='left'>"; echo "<tr><td colspan='7' id='th'>Character Attributes And Sub-Attributes</td></tr>"; echo "<tr class='sub'><td>Attribute/Sub-Attribute</td><td colspan='3' align='center'>Level</td><td colspan='3' align='center'>Points</td></tr>"; echo "<tr><td></td></tr>"; // keeps getting the next row until there are no more to get while($row = mysql_fetch_array( $result )) { echo "<tr><td>"; echo $row['attribute_id']; echo " "; echo $row['desc']; echo "</td><td width='2%'> </td><td width='1%' align='right'>"; echo $row['level']; echo "</td><td width='2%'> </td><td width='2%'> </td><td width='1%' align='right'>"; echo $row['points']; echo "</td><td width='2%'> </td></tr>"; } echo "</table>"; echo "</td></tr></table>"; ?> Quote Link to comment Share on other sites More sharing options...
twilitegxa Posted September 18, 2008 Author Share Posted September 18, 2008 I'm just testing on Firefox and IE for now. I have a Mac, but I'm using Windows on it, so that' why :-) Quote Link to comment Share on other sites More sharing options...
twilitegxa Posted September 18, 2008 Author Share Posted September 18, 2008 I haven't changed the code yet, but I remember someone sayign that you can have a separate CSS for IE or use hacks. I think I already have one hack in my CSS for IE for alignment. Do you think a separate CSS for IE would work better than constantly changing it? Quote Link to comment Share on other sites More sharing options...
F1Fan Posted September 18, 2008 Share Posted September 18, 2008 Not sure. I program for Firefox, and try to make it IE compliant. But I never do anything way special to make it IE compliant. Quote Link to comment Share on other sites More sharing options...
twilitegxa Posted September 18, 2008 Author Share Posted September 18, 2008 Okay, I saved the file that looked good on my computer, just in case we mess it up while trying to make it look better in IE LOL Quote Link to comment Share on other sites More sharing options...
F1Fan Posted September 18, 2008 Share Posted September 18, 2008 I have one more idea if this doesn't work, so let me know. Quote Link to comment Share on other sites More sharing options...
twilitegxa Posted September 18, 2008 Author Share Posted September 18, 2008 And I posted the new code, but it doesn't appear that anything changed. 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.