Table wont fill whole screen

Location of the Videos
Post Reply
pretender5552
Posts: 127
Joined: Mon Jan 03, 2011 5:38 am

Table wont fill whole screen

Post by pretender5552 »

For some reason even though I have the table set to 100% it wont fill the screen, I check my style sheet to make sure I had set a width, but I still don't know why its stuck.

Code: Select all

<?php
include_once 'connect.php';
include_once 'div.php';
include_once 'div2.php';
?>
<link href="style.css" rel="stylesheet" type="text/css" />

<?php
if (isset($_SESSION['players']))
{
  $player=$_SESSION['players'];
}
$playerinfo="SELECT * from players where name='$player'";
$playerinfo2=mysql_query($playerinfo) or die((mysql_error()));
$playerinfo3=mysql_fetch_array($playerinfo2);

$playername = $playerinfo3['name'];
$playerlevel = $playerinfo3['level'];
$playergroup = $playerinfo3['group'];
$playeraddstat = $playerinfo3['addstat'];
$playercypher = $playerinfo3['cypher'];

?>
<div id='levelbar'>
<?php
echo "<table width=100% border='1' cellspacing='0' bordercolor=green><tr><td bgcolor='000000'>";
echo "<font color='000000'>" . "&nbsp&nbsp&nbsp" ."</font><font color='ffffff'><b>" . $playername . "</b></font>";
echo "<font color='000000'>" . "&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp" ."</font><font color='ffffff'><b> Level: " . $playerlevel . "</b></font>";
echo "<font color='000000'>" . "&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp" ."</font><font color='ffffff'><b>Exp: </b></font>";
echo "<font color='000000'>" . "&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp" ."</font><font color='ffffff'><b>Network: " . $playergroup . "</b></font>";
echo "<font color='000000'>" . "&nbsp&nbsp&nbsp&nbsp" ."</font><font color='ffffff'>(<a href='invite.php'></font><font color='ffff99'><b>Recruit</b></font><font color='ffffff'></a>)</font>";
echo "<font color='000000'></font>";
echo "</td></tr></table>";
?>
</div>
<div id='buttons'>
<?php
echo "<table width=100%>";
echo "<tr background='images/home.jpg'>";
echo "<td><a href='home.php' style='text-decoration: none'><font color='2bab4c'><b><center>Home</center></b></font></a></td>";
echo "<td><a href='player.php' style='text-decoration: none'><font color='2bab4c'><b><center>Player($playeraddstat)</center></b></font></a></td>";
echo "<td><a href='jobs.php' style='text-decoration: none'><font color='2bab4c'><b><center>Jobs</center></b></font></a></td>";
echo "<td><a href='fight.php' style='text-decoration: none'><font color='2bab4c'><b><center>Fight</center></b></font></a></td>";
echo "<td><a href='shop.php' style='text-decoration: none'><font color='2bab4c'><b><center>Shop</center></b></font></a></td>";
echo "<td><a href='assets.php' style='text-decoration: none'><font color='2bab4c'><b><center>Assets</center></b></font></a></td>";
echo "<td><a href='angel.php' style='text-decoration: none'><font color='2bab4c'><b><center>Angel($playercypher)</center></b></font></a></td>";
echo "<td><a href='gift.php' style='text-decoration: none'><font color='2bab4c'><b><center>Gifts</center></b></font></a></td>";
echo "<td><a href='hitlist.php' style='text-decoration: none'><font color='2bab4c'><b><center>Hitlist</center></b></font></a></td>";
echo "<td><a href='ranking.php' style='text-decoration: none'><font color='2bab4c'><b><center>Ranking</center></b></font></a></td>";
echo "<td><a href='Raid.php' style='text-decoration: none'><font color='2bab4c'><b><center>Raid</center></b></font></a></td>";
echo "</tr>";
echo "</table>";
?>
</div>
style sheet

Code: Select all

body {
  background-color: #000000;
}
#div {
   position:absolute;
   left:0px;
   top:0px;
}
#div2 {
   position:absolute;
   right:0px;
   top:150px;
   height:20px;
}
#levelbar {
   position:absolute;
   left:0px;
   height:17px;
}
#experiencebar {
   position:absolute;
   left:188px;
   top:200px;
   width:100px;
   height:15px;
   z-index:1;
}
#experience {
   position:absolute;
   left:191px;
   top:203px;
   width:100px;
   z-index:2;
   text-align:left;
}
#buttons {
   position:absolute;
   left:0px;
   top:226px;
   height:20px;
}
#playerbox {
   position:absolute;
   left:0px;
   top:250px;
   width:100px;
   height:20px;
}
 #profile {
   position:absolute;
   left:0px;
   top:240px;

   height:20px;
}
#nextlevel {
   position:absolute;
   left:360px;
   top:49px;
   width:400px;
   height:20px;
}
#stats {
   position:absolute;
   left:360px;
   top:105px;
   width:400px;
   height:20px;
}
#fightstats {
   position:absolute;
   left:360px;
   top:355px;
   width:400px;
   height:20px;
}
#weapon {
   position:absolute;
   left:0px;
   top:555px;
   height:20px;
}
#specielitem {
   position:absolute;
   left:0px;
   top:635px;
   height:20px;
}
#vehicle {
   position:absolute;
   left:0px;
   top:715px;
   height:20px;
}
User avatar
OldRod
Posts: 1320
Joined: Sun Sep 20, 2009 4:26 pm

Re: Table wont fill whole screen

Post by OldRod »

The table is inside the 'levelbar' div tag... you may need to put a "margin: 0px" or a "width: 100%" on that div tag in your style sheet. Other than that, it seems like it should work. It doesn't look like it's nested inside anything else, at least from the code you posted.
User avatar
Chris
Posts: 1580
Joined: Wed Sep 30, 2009 7:22 pm

Re: Table wont fill whole screen

Post by Chris »

Tables are made to put information into, they are not made for layouts. Use a HTML as it's made to be used.
Fighting for peace is declaring war on war. If you want peace be peaceful.
Post Reply

Return to “Older Browser MMO Videos”