garrensilverwing
New Member
- Messages
- 148
- Reaction score
- 0
- Points
- 0
http://war2ladder.x10hosting.com/record.php/php?player1=$paCe&player2=S9isDragon
when you look at this page in firefox or safari it looks perfectly fine, but if you look at it in IE7 or 8 (i havent checked 6 cause mine is broken for some reason) the Games div floats way off to the right. I could not tell why it was doing this here is my code:
when you look at this page in firefox or safari it looks perfectly fine, but if you look at it in IE7 or 8 (i havent checked 6 cause mine is broken for some reason) the Games div floats way off to the right. I could not tell why it was doing this here is my code:
PHP:
<html>
<?php
include_once("functions.php");
include_once("db_connect.php");
$Player1 = $_GET['player1'];
$Player2 = $_GET['player2'];
$Offset = $_GET['offset'];
if(!$Offset) $Offset = 0;
$result = mysql_query("SELECT Winner FROM checkedgames WHERE Winner LIKE '$Player1' AND Loser LIKE '$Player2' OR Winner LIKE '$Player2' AND Loser LIKE '$Player1'") or die(mysql_error());
$Player1Wins = 0;
$Player2Wins = 0;
while($row = mysql_fetch_array($result))
{
$GameWinner = $row['Winner'];
if($GameWinner == $Player1) $Player1Wins = $Player1Wins + 1;
if($GameWinner == $Player2) $Player2Wins = $Player2Wins + 1;
}
$Record = "Current 1v1 Record: <strong>$Player1Wins - $Player2Wins</strong>";
?>
<head>
<link rel="stylesheet" type="text/css" href="http://<?php echo $_SERVER[SERVER_NAME]; ?>/style.css" />
<title><?php echo "$Player1 - $Player2 Record * War2Ladder ";?></title>
</head>
<body>
<div id="wrapper" class="Wrapper">
<?php masthead(); ?>
<div id="stats" class="Stats">
<?php
echo "<h3>Games between <a href=\"http://".$_SERVER[SERVER_NAME]."/player.php/php?player=$Player1\">$Player1</a> and <a href=\"http://".$_SERVER[SERVER_NAME]."/player.php/php?player=$Player2\">$Player2</a>";
echo "<h4>$Record</h4></div>\n";
?>
<div id="GamesWrapper" class="GamesWrapper"><div id="Games" class="Games"><h4><ul>
<?php
$games = mysql_query("SELECT * FROM checkedgames WHERE Winner LIKE '$Player1' AND Loser LIKE '$Player2' OR Winner LIKE '$Player2' AND Loser LIKE '$Player1' ORDER BY DateT DESC LIMIT 10 OFFSET $Offset") or die(mysql_error());
while($row = mysql_fetch_array($games))
{
$GameID = $row['GameID'];
$Winner = $row['Winner'];
$Loser = $row['Loser'];
$Map = $row['Map'];
$DateT = $row['DateT'];
$Year = substr($DateT, 0, 4);
$Month = substr($DateT, 4, 2);
$Day = substr($DateT, 6, 2);
$Hour = substr($DateT, 8, 2);
$Minute = substr($DateT, 10, 2);
$Second = substr($DateT, 12, 2);
$DateT = "$Hour:$Minute:$Second on $Month/$Day/$Year";
$WOldRank = $row['WOldRank'];
$WNewRank = $row['WNewRank'];
$LOldRank = $row['LOldRank'];
$LNewRank = $row['LNewRank'];
$WOldRank = $row['WOldRank'];
$WNewRank = $row['WNewRank'];
$LOldRank = $row['LOldRank'];
$LNewRank = $row['LNewRank'];
$LRank = Rank($LOldRank,$LNewRank);
$WRank = Rank($WOldRank,$WNewRank);
echo "<li><a href=\"http://".$_SERVER[SERVER_NAME]."/player.php/php?player=$Winner\">$Winner</a> ($WRank) defeated <a href=\"http://".$_SERVER[SERVER_NAME]."/player.php/php?player=$Loser\">$Loser</a> ($LRank) on \"$Map\" at <a href=\"http://server.war2.ru/reports/$GameID\" target=\"_blank\">$DateT</a>.</li>\n";
}
?>
</ul></h4></div></div><div id=\"FooterLinks\" class=\"FooterLinks\">
<?php
TablePages($Offset,$Player1,$Player2,$result);
?>
<h5 style="text: x-small; font-weight: normal;">All Times are in MSK (UTC +3).</h5></div>
<?php
function TablePages($Offset,$Player1,$Player2,$result)
{
$count = mysql_num_rows($result);
if($count > 10)
{
if($Offset == 0)
{
$Offset = 10;
$LinkString = "<a href=\"http://".$_SERVER[SERVER_NAME]."/record.php/php?offset=$Offset&player1=$Player1&player2=$Player2\">Next Page >></a>";
}
else
{
if($count > $Offset + 10)
{
$NextPage = $Offset + 10;
$PrevPage = $Offset - 10;
$LinkString = "<a href=\"http://".$_SERVER[SERVER_NAME]."/record.php/php?offset=$PrevPage&player1=$Player1&player2=$Player2\"><< Previous Page</a><span style=\"color:#005DB3\"> | </span><a href=\"http://".$_SERVER[SERVER_NAME]."/record.php/php?offset=$NextPage&player1=$Player1&player2=$Player2\">Next Page >></a>";
}
else
{
$PrevPage = $Offset - 10;
$LinkString = "<a href=\"http://".$_SERVER[SERVER_NAME]."/record.php/php?offset=$PrevePage&player1=$Player1&player2=$Player2\"><< Previous Page</a>";
}
}
}
echo $LinkString;
}
?>
</div>
</body>
</html>
Code:
ul {
text-align: left;
list-style-type: none;
margin-top = .5em;
}
li {
padding: 2px;
}
.GamesWrapper {
text-align: center;
position: relative;
border: thin #CCC solid;
padding: 5px;
width: 95%;
margin-right: auto;
margin-left: auto;
margin-bottom: 15px;
}
.Games{
height: 295px;
}
table{
position: relative;
text-align: center;
color: #02243C;
background-color: #F9F9F9;
border: thin #02243C solid;
width: 75%;
margin-left: auto;
margin-right: auto;
border-collapse: collapse;
}