Jump to content

[SOLVED] Aligning Tables on Page


twilitegxa

Recommended Posts

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 "&#39; " ;
echo $row['heightinches'];
echo "&#34;";
        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>";

Link to comment
Share on other sites

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>

 

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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>";
?>

Link to comment
Share on other sites

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>";
?>

Link to comment
Share on other sites

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>";
?>

Link to comment
Share on other sites

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>";
?>

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.