Hi I am trying to do a new design in this script and I have no idea why but when I put my html/css footer code in the php file it doesn't put the footer where it should be. Here is what I mean [Click Here](null) and this is the code. Any help would be greatly appreciated thanks.

<?php
  session_start();
include "header.php";
include "config.php";
$a="";
$b="";
if ($_POST) {
    $a=trim($_POST["id"]);
    $b=trim($_POST["password"]);
    $a=str_replace("'","",$a);
    $b=str_replace("'","",$b);
    $a=str_replace("\"","",$a);
    $b=str_replace("\"","",$b);
}
if ($a=="" || $b=="")
{

  if ($_SESSION["username_session"]=="" || $_SESSION["password_session"]=="")
  {

?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<html>
<body>
            <form action="login.php" method="post">

<br><br><Center><table><tr><td colspan=2 align=center><h3>Members Login Area</h3></td></tr>
<tr><td>Username</td><td><input type="text" name="id"></td></tr>
<tr><td>Password</td><td><input type="password" name="password"></td></tr>
<tr><td>&nbsp;</td><td>
<a href="forgot.php" onclick="doexit=false;"><font face="Verdana,Arial,Helvetica" size="1" color="#000000"><b>Forgot Your Password?</b></font></a></td></tr>
<tr><td colspan=2 align=center><input type="submit" value="Log In"></td></tr>            
</table>
</font></p>
</form>

<?
  }
  else
  {
  middle();
  }
}
else
{
$check=0;

$id=$_POST["id"];
$rs = mysql_query("select * from users where Username='$id' and Password='$b' and active=1");

if (mysql_num_rows($rs)>0) {
$arr=mysql_fetch_array($rs);
        $check=1;
        $_SESSION["username_session"]=$arr[8];
        $_SESSION["password_session"]=$arr[9];
        middle();
}
if ($check==0)
{
$rs = mysql_query("select * from users where Username='$a' and Password='$b' and active=0");
if(mysql_num_rows($rs)>0) $check=3;
  if($check==0) {
  print "<h2 align=center>Invalid Username or Password.</h2>";
  }
  elseif($check==3) {
  print "<h3 align=center>You hadn't activated your account yet by clicking on activation link.<br>If you hadn't received the confirmation email yet <A href=resendv.php>Click Here</a> to resend your confirmation email.</h3>";
  }
?>
            <form action="login.php" method="post">

<br><br><Center><table><tr><td colspan=2 align=center><h3>Members Login Area</h3></td></tr>
<tr><td>Username</td><td><input type="text" name="id"></td></tr>
<tr><td>Password</td><td><input type="password" name="password"></td></tr>
<tr><td>&nbsp;</td><td>
<a href="forgot.php" onclick="doexit=false;"><font face="Verdana,Arial,Helvetica" size="1" color="#000000"><b>Forgot Your Password?</b></font></a></td></tr>
<tr><td colspan=2 align=center><input type="submit" value="Log In"></td></tr>            
</table>
</font></p>
</form>
<? 
} 
}

function middle()
{
include "config.php";
    $id=$_SESSION["username_session"];
    $rs = mysql_query("select * from users where Username='$id'");
    $arr=mysql_fetch_array($rs);
    $check=1;
    $email=$arr[7];
        $name=$arr[1];
    $ref=$arr[11];
    $username=$_SESSION[username_session];
    $status=$arr[14];
    if($status==1) {
        $statust="Free";
    }
    else {
        $statust="Pro";
    }
    $total=$arr[15];
    $paid=$arr[17];
    $unpaid=$arr[16];

?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td height="10" colspan="2">&nbsp;</td>
              </tr>
              <tr>
                <td align="left" class="bodytext" width="150" valign="top"><br> 
<p align="left"> &nbsp;<br><font face=verdana size=2><a href="login.php">Members Home</a><br><br> 
<a href="purchasepos.php">Purchase Package</a><br><br>
<a href="managepos.php">Manage Positions</a><br><br>
<a href="stats.php">Stats</a><br><br>
<a href="withdrawal.php">Withdrawal</a><br><br>
<a href="ads.php">Promotional Center</a><br><br>
<a href="banners.php">Banner Advertisement</a><br><br>
<a href="textadv.php">Text Ad Advertisement</a><br><br>
<a href="bonus.php">Bonus</a><br><br>
<a href="update_pf.php">Profile</a><br><br>
<a href="submittestimonials.php">Submit Testimonials</a><br><br>
<a href="logout.php">Logout</a>
</font></p>
</td><td align="left" class="bodytext" width="500" valign="top">
<table border="0" width="98%"><tr><td>
<?
$rs=mysql_query("select * from pages where ID=3");
$arr=mysql_fetch_array($rs);

$arr[2]=str_replace("{sitename}",$sitename,$arr[2]);
$arr[2]=str_replace("{name}",$name,$arr[2]);

echo stripslashes($arr[2]);
?>
</td></tr></table>


</td></tr>
              <tr>
                <td height="10" colspan="2">&nbsp;</td>
              </tr>
</table>
<? }
include "footer.php";
?>

Hi I couldn't edit the post so here is the header and footer, CSS for you guys completely forgot about them! sorry about that. Also note I am still learning how to code.

Header:

<link rel="stylesheet" type="text/css" href="stylesheet.css" />
<html>
<head>
<title>Maximum Creation</title>
</head>
<div id="pageborder">
<header>
<div id="Topnav">
 <div id="accountstatus"><p>Account Status:</p></div>
 <div id="login"><p>Login</p></div>
 <div id="register"><p>Register</p></div>
</div>

<div id="name">
<h2>Maximum Creation</h2>
</div>

<div id="banner"></div>
<div id="navbox">
 <div id="navmenu">
  <a href="">Home</a> |
  <a href="">Advertising</a> |
  <a href="">File Sharing</a> |
  <a href="">Subscription</a> |
  <a href="">Forum</a> |
  <a href="">About us</a> |
  <a href="">Contact us</a> |
  <a href="">Site News</a> |
 </div>
</div>
</header>

And now for the footer:

<?php
include "config.php";
$rs=mysql_query("select * from membersbanners where remaining>0 and approved=1 order by rand() limit 0,$showban");
while($arr=mysql_fetch_array($rs)) {
echo "<br><center><a href=$siteurl/trr.php?id=$arr[0] target=_blank><img src=$arr[2] width=468 height=60 border=0></a><br></center><br>";
$rsu=mysql_query("update membersbanners set remaining=remaining-1 where ID=$arr[0]");
}
mysql_close($dbconnect);
?>
<div id="footer"></div>
<div id="networklinksnames">Network Links</div>
<div id="networklinks">Networks still in development!</div>
<div id="sponsoredlinksnames">Sponsored Links</div>
<div id="sponsoredlinks">To put your links here go to <a href="http://www.maximumcreation.com/advertising.php">Advertising</a></div>
<div id="essentialsnames">Essentials</div>
<div id="essentials"><a href="">Terms&Conditions</a> </br> <a href="">Privacy Policy</a> </br> <a href="">DMCA</a> </br> <a href="">FAQ</a></div>
</table> 
</body>
</html>

Here is the CSS:

/*** Header ***/

body {
 margin:0 auto; 

}

#pageborder {
 width:1000px;
 margin:0 auto;
 height:1097px;
 border-bottom:2px solid rgba(255, 255, 255, .8);
 position:relative; bottom: 16px;
 background-color:rgba(223, 223, 223, 1);
 box-shadow:0 0 70px rgba(17, 17, 17, .4);
 -moz-box-shadow:0 0 70px rgba(17, 17, 17, .4);
 -webkit-box-shadow:0 0 70px rgba(17, 17, 17, .4);

}

#Topnav {
 width:100%;
 margin:auto;
 height:25px;
 background-color:rgba(0, 0, 0, .3);
 border-bottom:1px solid rgba(255, 255, 255, .8);

}

#accountstatus {
 margin:5px; 
text-shadow:0 1px 0px rgba(233, 233, 233, 1);

}

#login {
 margin:5px;
 color: #FFFFFF;
 position: relative; bottom: 36px; left: 500px;
 text-shadow:0 1px 0 #000000;

}

#login:hover {
 margin:5px;
 color: #FFFFFF;
 position: relative; bottom: 36px; left: 500px;
 text-shadow:0 1px 0 #000000;
 text-decoration: underline;

}

#register {
 margin:5px; 
 color: #FFFFFF;
 position: relative; bottom: 72px; left: 550px;
 text-shadow:0 1px 0 #000000; 

}

#register:hover {
 margin:5px; 
 color: #FFFFFF;
 position: relative; bottom: 72px; left: 550px;
 text-shadow:0 1px 0 #000000;
 text-decoration: underline; 

}



/*** Header Maximum Creation ***/

#name {
 float:left;
 height:75px;
 width:250px; 
 padding:19px 0 0 30px;
 text-shadow:0 2px 0 rgba(233, 233, 233, 1);
 -webkit-mask-image:-webkit-gradient(linear, left top, left bottombottom, from(rgba(0,0,0,1)), color-stop(50%, rgba(0,0,0,0)), to(rgba(0,0,0,1)));

}

#banner {
 height:90px;
 width:728px;
 position: relative; top: 5px; left: 267px;
 background-color:rgba(255, 0, 0, .7);

}

/*** Main Navigation ***/

#navbox {
 width:100%;
 height:20px;
 padding:6px 0;
 text-align:center;
 margin:10px 0 70px 0;
 color:rgba(0, 0, 0, 1);
 background:rgba(153, 153, 153, 1);
 border-top:1px solid rgba(0, 0, 0, .3);
 border-bottom:1px solid rgba(255, 255, 255, .8);

}

#navmenu a {
 margin:0 auto;
 padding:0 6px;
 text-decoration:none;
 color:rgba(255, 255, 255, 1);
 text-shadow:1px 0px 0px rgba(0, 0, 0, 1);

}

#navmenu a:hover {
 padding:6px 6px;
 color:rgba(68, 68, 68, .2);
 transition:all ease-out 0.3s;
 -moz-transition:all ease-out 0.3s;
 background:rgba(255, 255, 255, .7);
 -webkit-transition:all ease-out 0.3s;

}

/*** Content Area ***/

#leftcontainername {
 text-align: center;
 color: #000000;
 text-shadow: 1px 1px 1px #FFFFFF;
 background-color: #878787;
 height: 25px;
 width: 480px;
 position: relative; bottom: 60px; left: 10px;
 border-top:1px solid rgba(0, 0, 0, .3);
 border-bottom:1px solid rgba(255, 255, 255, .8);

}

#leftcontainer {
 background-color: #c8c8c8;
 padding-left: 10px;
 padding-right: 10px;
 text-align: left;
 height: 300px;
 width: 460px;
 position: relative; bottom: 60px; left: 10px;
 border-top:1px solid rgba(0, 0, 0, .3);
 border-bottom:1px solid rgba(255, 255, 255, .8);

}

#rightcontainername {
 text-align: center;
 color: #000000;
 text-shadow: 1px 1px 1px #FFFFFF;
 background-color: #878787;
 height: 25px;
 width: 480px;
 position: relative; bottom: 389px; left: 510px;
 border-top:1px solid rgba(0, 0, 0, .3);
 border-bottom:1px solid rgba(255, 255, 255, .8);

}

#rightcontainer {
 background-color: #c8c8c8;
 padding-left: 10px;
 padding-right: 10px;
 text-align: left;
 height: 300px;
 width: 460px;
 position: relative; bottom: 389px; left: 510px;
 border-top:1px solid rgba(0, 0, 0, .3);
 border-bottom:1px solid rgba(255, 255, 255, .8);

}

#bottomcontainer1name {
 text-align: center;
 color: #000000;
 text-shadow: 1px 1px 1px #FFFFFF;
 background-color: #878787;
 height: 25px;
 width: 980px;
 position: relative; bottom: 380px; left: 10px;
 border-top:1px solid rgba(0, 0, 0, .3);
 border-bottom:1px solid rgba(255, 255, 255, .8);

}

#bottomcontainer1 {
 text-align: center;
 padding-left: 10px;
 padding-right: 10px;
 overflow-x:hidden; overflow-y:scroll;
 text-shadow: 1px 1px 1px #FFFFFF;
 background-color: #c8c8c8;
 height: 85px;
 width: 960px;
 position: relative; bottom: 380px; left: 10px;
 border-top:1px solid rgba(0, 0, 0, .3);
 border-bottom:1px solid rgba(255, 255, 255, .8);

}

#bottomleftcontainerad {
 background-color:rgba(255, 0, 0, .7);
 height: 60px;
 width: 468px;
 position: relative; bottom: 370px; left: 10px;

}

#bottomrightcontainerad {
 background-color:rgba(255, 0, 0, .7);
 height: 60px;
 width: 468px;
 position: relative; bottom: 430px; left: 520px;

}

#leftbottomcontainer {
 text-align: center;
 padding-left: 10px;
 padding-right: 10px;
 text-shadow: 1px 1px 1px #FFFFFF;
 background-color: #c8c8c8;
 height: 315px;
 width: 420px;
 position: relative; bottom: 413px; left: 10px;
 border-top:1px solid rgba(0, 0, 0, .3);
 border-bottom:1px solid rgba(255, 255, 255, .8);

}

#leftbottomcontainername {
 text-align: center;
 padding-left: 10px;
 padding-right: 10px;
 text-shadow: 1px 1px 1px #FFFFFF;
 background-color: #878787;
 height: 25px;
 width: 420px;
 position: relative; bottom: 413px; left: 10px;
 border-top:1px solid rgba(0, 0, 0, .3);
 border-bottom:1px solid rgba(255, 255, 255, .8);

}

#rightbottomcontainer {
 text-align: center;
 padding-left: 10px;
 padding-right: 10px;
 text-shadow: 1px 1px 1px #FFFFFF;
 background-color: #c8c8c8;
 height: 315px;
 width: 420px;
 position: relative; bottom: 757px; left: 548px;
 border-top:1px solid rgba(0, 0, 0, .3);
 border-bottom:1px solid rgba(255, 255, 255, .8);

}

#rightbottomcontainername {
 text-align: center;
 padding-left: 10px;
 padding-right: 10px;
 text-shadow: 1px 1px 1px #FFFFFF;
 background-color: #878787;
 height: 25px;
 width: 420px;
 position: relative; bottom: 757px; left: 548px;
 border-top:1px solid rgba(0, 0, 0, .3);
 border-bottom:1px solid rgba(255, 255, 255, .8);

}

/*** Footer Area ***/

#footer {
 background-color: #cfe2eb;
 height: 130px;
 width: 1000px;
 border-top:1px solid rgba(0, 0, 0, .3);
 position:relative; bottom: 710px;

}

#networklinksnames {
 text-decoration: underline;
 font-family: "Lucida Grande",Georgia,Serif;
 color: #333;
 position: relative; bottom: 840px; left: 90px;


}

#networklinks {
 padding: 0px 0px 0px 5px;
 color: #666666;
 font-family: "Lucida Grande",Georgia,Serif;
 position: relative; bottom: 840px; left: 40px;


}

#sponsoredlinksnames {
 text-decoration: underline;
 color: #333;
 font-family: "Lucida Grande",Georgia,Serif;
 position: relative; bottom: 880px; left: 420px;
}

#sponsoredlinks {
 text-decoration:none;
 color: #666666;
 font-family: "Lucida Grande",Georgia,Serif;
 position: relative; bottom: 880px; left: 350px;
}

#sponsoredlinks a {
 text-decoration: none;
 color: #blue;
 font-family: "Lucida Grande",Georgia,Serif;
 position: relative; bottom: 0px;
}

#essentialsnames {
 text-decoration: underline;
 color: #333;
 font-family: "Lucida Grande",Georgia,Serif;
 position: relative; bottom: 920px; left: 750px;
}


#essentials {
 text-decoration: none;
 color: #666666;
 font-family: "Lucida Grande",Georgia,Serif;
 position: relative; bottom: 920px; left: 750px;
}

#essentials a {
 text-decoration: underline;
 color: #002cd0;
 font-family: "Lucida Grande",Georgia,Serif;
}
Member Avatar
diafol

I'm assuming it's a PHP issue as this is the PHP forum, but you're alluding to CSS. So what do you need to check? You've posted about 200 lines of html/php and 350 lines of css. How about cutting things down to relevance, you may get more replies.

Can't cut it down forgot to take out a few of the small things I would only be able to cut out like 100 lines of CSS that ain't needed on there but thats it and it could be either the CSS or PHP but I can't figure out which I have tried numerous things to try getting the footer to the right place but it just isn't happening.