I am having trouble centering my footer on a page. Not understanding it really do to the fact all of the pages have them same structure. Any help would be appreciated. The trouble is with the play page so i’ll provide a link below.
Game Junkie - Play Free Online Flash Games!
play.php:
<?php
include 'functions.php';
$id = $_GET['game'];
$query = mysql_query("SELECT * FROM games WHERE id='".$id."'");
$game = mysql_fetch_array($query);
if(mysql_num_rows($query) == 0){
header('Location: /err/404.php');
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php echo $page_title; ?></title>
<meta name="description" content="Play games online for free. Action games, Adventure games, Arcade games, Puzzle games, Simulation games, Sports games and Strategy games.">
<meta name="keywords" content="Free, Flash, Games, Online, Action, Adventure, Arcade, Puzzle, Simulation, Sports, Strategy">
<link rel="stylesheet" type="text/css" href="style.css" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/jquery-ui.min.js"></script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-24101435-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body>
<div id="page">
<!-- Start:Page Banner -->
<div id="top" onclick="window.location.href='/'" onmouseover="this.style.cursor='pointer'">
<div class="back"> </div>
<div class="content">
<p>Game Junkie</p>
</div>
</div>
<!-- End:Page Banner -->
<!-- Start:Bottom -->
<div id="bottom">
<div class="trans"> </div>
<div id="menu">
<ul id="nav">
<li><a href="category.php?value=action">Action</a></li>
<li><a href="category.php?value=adventure">Adventure</a></li>
<li><a href="category.php?value=arcade">Arcade</a></li>
<li><a href="category.php?value=puzzle">Puzzle</a></li>
<li><a href="category.php?value=simulation">Simulation</a></li>
<li><a href="category.php?value=sports">Sports</a></li>
<li><a href="category.php?value=strategy">Strategy</a></li>
<li class="last"><a id="more_btn" onclick="$('#more_con').slideToggle(2000);">More</a></li>
</ul>
</div>
<div id="more_con">Coming Soon</div>
<div class="content">
<!-- Start:Content -->
<!-- Start:Ad -->
<div class="ad_2">
<table cellpadding="0" border="0" cellspacing="0" style="background-color:#900;height:90px;width:728px;">
<tr>
<td>Advertise Here</td>
</tr>
</table>
</div>
<!-- End:Ad -->
<?php
$total = $game['total_plays']+1;
mysql_query("UPDATE games SET total_plays=$total WHERE id='".$id.".swf'");
mysql_query("INSERT INTO plays VALUES ('', '".$game['id']."', '".time()."')");
$info = getimagesize('file_database/'.$game['swf'].'');
list($width, $height) = $info;
$game = mysql_fetch_array(mysql_query("SELECT * FROM games WHERE id='".$id."'"));
$today_query = mysql_query("SELECT COUNT(*) FROM plays WHERE game_id='".$id."' AND date >='". (time() - (86400)) ."'");
$week_query = mysql_query("SELECT COUNT(*) FROM plays WHERE game_id='".$id."' AND date >='". (time() - (604800)) ."'");
$today = mysql_fetch_row($today_query);
$week = mysql_fetch_row($week_query);
$name = $game['name'];
$name = strtolower($name);
$name = explode(" ", $name);
$name = implode("-", $name);
$name = ereg_replace('\\.', '', $name);
?>
<div id="game" style="width:<?php echo $width; ?>px;height:<?php echo $height; ?>px;">
<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" WIDTH="<?php echo $width; ?>" HEIGHT="<?php echo $height; ?>" CODEBASE="http://active.macromedia.com/flash5/cabs/swflash.cab#version=5,0,0,0">
<PARAM NAME="MOVIE" VALUE="file_database/<?php echo $name; ?>.swf">
<PARAM NAME="PLAY" VALUE="true">
<PARAM NAME="LOOP" VALUE="true">
<PARAM NAME="QUALITY" VALUE="high">
<PARAM NAME="SCALE" value="noborder">
<EMBED SRC="file_database/<?php echo $name; ?>.swf" WIDTH="<?php echo $width; ?>" HEIGHT="<?php echo $height; ?>" PLAY="true" LOOP="true" QUALITY="high" scale="noborder" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>
</OBJECT>
</div>
<div id="info">
<div id="header">Game Information</div>
<div style="float:left;width:410px;text-align:left;">Description<br />
<div style="font-size:11px;font-family:Verdana, Geneva, sans-serif;">
<?php if(empty($game['description'])){ echo 'N/A'; } else { echo $game['description']; } ?>
</div>
<br />
Instructions<br />
<div style="font-size:11px;font-family:Verdana, Geneva, sans-serif;">
<?php if(empty($game['instructions'])){ echo 'N/A'; } else { echo $game['instructions']; } ?>
</div>
<br />
<div style="font-size:11px;font-family:Verdana, Geneva, sans-serif;"> Name: <strong><?php echo $game['name']; ?></strong><br />
Author: <strong><?php echo $game['author']; ?></strong><br />
Added: <strong>
<?php $date = date('F j', $game['date']).'<sup>'.date('S', $game['date']).'</sup>'.date(', Y', $game['date']); echo $date; ?>
</strong> <br />
Total Plays: <strong><?php echo number_format($game['total_plays']); ?></strong><br />
Plays Today: <strong><?php echo $today[0]; ?></strong><br />
Plays In The Last Week: <strong><?php echo $week[0]; ?></strong><br />
</div>
</div>
<!-- Start:Ad -->
<div class="ad_3">
<table cellpadding="0" border="0" cellspacing="0" style="background-color:#900;height:250px;width:300px;">
<tr>
<td>Advertise Here</td>
</tr>
</table>
</div>
</div>
<div class="ad_2">
<table cellpadding="0" border="0" cellspacing="0" style="background-color:#900;height:90px;width:728px;">
<tr>
<td>Advertise Here</td>
</tr>
</table>
</div>
<!-- End:Ad -->
</div>
</div>
<!-- End:Content -->
</div>
<!-- End:Bottom -->
<!-- Start:Footer -->
<div id="footer">
<div class="back"> </div>
<div class="content"><a href="privacy.php">Privacy Policy</a> - <a href="contact.php">Contact Us</a><br />
© 2011 GameJunkie.ca</div>
</div>
<!-- End:Footer -->
</div>
</body>
</html>
style.css:
/* Start:Cross-Page Styles */
html {
border:0px;
margin:0px;
outline:0px;
padding:0px;
cursor:default;
}
body {
background-image:url(images/back.jpg);
background-color:#111;
background-repeat:repeat;
background-position:right top;
color:#fff;
font:12px Arial Black, Gadget, sans-serif;
}
a {
color:#000;
}
#page {
position:relative;
text-align:center;
width:800px;
margin-left:auto;
margin-right:auto;
margin-top:10px;
margin-bottom:10px;
border:0px;
outline:0px;
padding:0px;
}
/* Start: Banner */
#top {
width:800px;
height:75px;
position:relative;
float:left;
overflow:hidden;
margin:10px 0px 16px 0px;
}
#top .back {
opacity:0.6;
filter:alpha(opacity=60);
-moz-opacity:0.6;
background-color:#000;
width:800px;
height:75px;
position:absolute;
top:0px;
left:0px;
-moz-border-radius:8px;
-webkit-border-radius:8px;
border-radius:8px;
}
#top .content {
position:relative;
}
#top .content p {
color:#069;
font-size:24px;
text-shadow: 0px -1px 0px #111;
}
/* End: Banner */
/* Start: Footer */
#footer {
clear:left;
float:left;
height:45px;
margin-top:16px;
margin-bottom:10px;
margin-left:auto;
margin-right:auto;
overflow:hidden;
position:relative;
text-align:center;
width:800px;
}
#footer .back {
opacity:0.6;
filter:alpha(opacity=60);
-moz-opacity:0.6;
background-color:#000;
width:800px;
height:42px;
position:absolute;
top:0px;
left:0px;
-moz-border-radius:8px;
-webkit-border-radius:8px;
border-radius:8px;
}
#footer .content {
font-family:Verdana, Geneva, sans-serif;
font-size:10px;
padding:8px 0px;
position:relative;
text-align:center;
}
#footer .content ul {
list-style:none;
text-align:center;
}
#footer .content ul li {
display:block;
float:left;
}
#footer .content a {
color:#069;
text-decoration:none;
}
/* End: Footer */
/* Start: Menu */
#menu {
text-align:center;
width:100%;
height:auto;
overflow:hidden;
position:relative;
display:block;
}
#nav {
width:100%;
height:34px;
float:left;
display:block;
text-align:center;
margin-left:auto;
margin-right:auto;
margin-top:20px;
padding:0px;
list-style:none;
background-color:#069;
color:#000;
font:13px Arial Black, Gadget, sans-serif;
}
#nav li {
float:left;
display:block;
}
#nav li a {
display:block;
padding:8px 22px;
text-decoration:none;
font-weight:bold;
}
#nav li a:hover {
background-color:#0076AE;
}
#nav li.last {
cursor:pointer;
float:none;
overflow:hidden;
}
#more_con {
width:776px;
height:150px;
margin:0px 12px 12px 12px;
position:relative;
background-color:#0076AE;
-webkit-border-radius:8px;
-moz-border-radius:8px;
border-radius:8px;
display:none;
}
/* End: Menu */
/* Start: Bottom */
#bottom {
width:800px;
height:100%;
position:relative;
float:left;
overflow:hidden;
}
#bottom .trans {
opacity:0.6;
filter:alpha(opacity=60);
-moz-opacity:0.6;
background-color:#000;
width:800px;
height:100%;
position:absolute;
top:0px;
left:0px;
-moz-border-radius:8px;
-webkit-border-radius:8px;
border-radius:8px;
}
#bottom .content {
position:relative;
padding:0px 12px 12px 12px;
}
/* End: Bottom */
#section {
text-align:center;
background:#111;
-moz-border-radius:8px;
-webkit-border-radius:8px;
border-radius:8px;
float:left;
padding:8px 0px 0px 8px;
margin-right:12px;
margin-bottom:12px;
}
#icon {
text-align:center;
background:#222;
-moz-border-radius:5px;
-webkit-border-radius:5px;
border-radius:5px;
float:left;
margin-right:8px;
margin-bottom:8px;
padding:3px;
cursor:pointer;
}
#header {
text-align:left;
padding:0px 25px 0px 3px;
background:#069;
border-bottom-right-radius:5px;
-moz-border-radius-bottomright:5px;
-webkit-border-bottom-right-radius:5px;
border-top-right-radius:5px;
-moz-border-radius-topright:5px;
-webkit-border-top-right-radius:5px;
clear:right;
margin-bottom:8px;
position:relative;
left:-8px;
color:#000;
font:18px Arial Black, Gadget, sans-serif;
height:26px;
width:auto;
}
#game {
text-align:center;
background:#111;
-moz-border-radius:8px;
-webkit-border-radius:8px;
border-radius:8px;
padding:8px;
overflow:hidden;
clear:right;
margin:auto;
margin-bottom:12px;
}
#info {
text-align:center;
background:#111;
width:728px;
-moz-border-radius:8px;
-webkit-border-radius:8px;
border-radius:8px;
float:left;
padding:8px 0px 8px 8px;
margin-left:17px;
margin-bottom:12px;
clear:right;
}
/* End:Cross-Page Styles */
/* Start: Ads */
.ad_1 {
text-align:center;
vertical-align:top;
background:#111;
-moz-border-radius:8px;
-webkit-border-radius:8px;
border-radius:8px;
float:left;
padding:7px;
position:relative;
margin:0px 0px 12px 0px;
clear:left;
}
.ad_2 {
text-align:center;
background:#111;
width:728px;
height:90px;
-moz-border-radius:8px;
-webkit-border-radius:8px;
border-radius:8px;
float:left;
padding:7px;
margin-left:17px;
margin-bottom:12px;
clear:right;
}
.ad_3 {
text-align:center;
background:#222;
width:300px;
height:250px;
-moz-border-radius:8px;
-webkit-border-radius:8px;
border-radius:8px;
float:left;
padding:5px;
clear:right;
}
.ad_4 {
text-align:center;
-moz-border-radius:5px;
-webkit-border-radius:5px;
border-radius:5px;
float:left;
padding:5px;
clear:both;
background-color:#222;
margin:0px 149px 8px 149px;
height:60px;
width:468px;
}
.ad_5 {
text-align:center;
-moz-border-radius:5px;
-webkit-border-radius:5px;
border-radius:5px;
float:left;
padding:5px;
clear:both;
background-color:#111;
margin:0px 149px 12px 149px;
height:60px;
width:468px;
}
/* End: Ads */