Jump to content

Tables are moving


Pi_Mastuh

Recommended Posts

One piece of advice: don't use tables. Also it isnt a good idea having a background image and trying to line things up exactly, you would be better off having a <div> and styling the CSS so you get the blue column behind it.

Link to comment
Share on other sites

How do I do that? Here's the code I'm using:

 

<?
session_start();
$session=session_id( );
include ("secure/config.php"); //WHEN YOU PUT THIS ON THE PAGES ADD A secure/ BEFORE CONFIG.PHP!
?>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
<META NAME="Description" CONTENT="Net-Petz is the newest virtual pet site on the internet. It has fun games, lots of cool petz to adopt, and tons of awesome items! It's completely free!">
<META NAME="Keywords" CONTENT="petz, net, virtual, pets, pet, fun, games, game, ">
</head>
<body>
<? if ($preuserID == 0) {
include ("../oops.htm");
die;
} ?>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="1155" id="AutoNumber1" height="802">
  <tr><td width="1483" height="138" valign="top" align="right" <?
$rand = rand (1,10);
	if ($rand == 1)
		{
			echo "background=SB1_anubis.png";
		}
	elseif ($rand == 2)
		{
			echo "background=SB1_bromaro.png";
		}
	elseif ($rand == 3)
		{
			echo "background=SB1_fang.png";
		}
	elseif ($rand == 4)
		{
			echo "background=SB1_kitachia.png";
		}	
	elseif ($rand == 5)
		{
			echo "background=SB1_coarattla.png";
		}	
	elseif ($rand == 6)
		{
			echo "background=SB1_dragonous.png";
		}	
	elseif ($rand == 7)
		{
			echo "background=SB1_fizz.png";
		}	
	elseif ($rand == 
		{
			echo "background=SB1_woofosa.png";
		}
	elseif ($rand == 9)
		{
			echo "background=SB1_worfoli.png";
		}	
	elseif ($rand == 10)
		{
			echo "background=SB1_lionaya.png";
		}	
?> colspan="2">
    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber3" height="113">
      <tr>
        <td width="15%" height="104" colspan="3" rowspan="3"> </td>
        <td width="31%" height="40"> </td>
        <td width="54%" height="104" rowspan="3"> </td>
      </tr>
      <tr>
        <td width="31%" height="23">
        <p align="center"><b>
        <font color="#FFFFFF" face="Arial" style="font-size: 11pt"><? if ($preuserID != 0){ print "<a href=http://www.net-petz.com/reg/lookup.php?Name=$preuserName><font color=#FFFFFF>$preuserName</a>"; } else { print "Guest"; } ?> - 
        <? if ($preuserID != 0){ print "<a href=http://www.net-petz.com/reg/bank.php><font color=#FFFFFF>$points NPz</a>"; } else { print "0 NPz"; } ?> - <? if ($preuserID != 0 AND $activePetID == 0) { print "No Active Pet"; } elseif ($preuserID != 0){ print "<a href=http://www.net-petz.com/reg/petDetails2.php?monopetID=$activePetID><font color=#FFFFFF>$activePetName</a> is Active"; } else { print "No Active Pet"; } ?></font></b></td>
      </tr>
    </table>
    </td>
  </tr>
  <tr>
    <td width="325" height="657" valign="top" align="right" background="SB3.png">
    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="103%" id="AutoNumber4" height="42">
      <tr>
        <td width="7%" height="27" align="center"> </td>
        <td width="51%" height="27" align="center" valign="top"> 
        </td>
        <td width="92%" height="27"> </td>
      </tr>
      <tr>
        <td width="7%" height="536" align="center"> </td>
        <td width="51%" height="536" align="center" valign="top">
<font color="#FFFFFF" face="Arial"> <font color="#FFFFFF" face="Arial"><b>.:Main:.<br>
        </b> <? if ($preuserID != 0){ echo "<font color=#FFFFFF face=Arial><a href=http://www.net-petz.com/reg/home.php><font color=#FFFFFF>Home</a>"; } else { echo "<font color=#FFFFFF face=Arial><a href=http://www.net-petz.com><font color=#FFFFFF>Home</a>"; } ?><br></font>
        <a href="http://www.net-petz.com/reg/mypets.php"><font color="#FFFFFF">My Petz</font></a><br>
        <a href="http://www.net-petz.com/reg/myitems.php"><font color="#FFFFFF">Inventory</font></a><br>
        <? if ($preuserID != 0){ echo "<a href=http://www.net-petz.com/reg/logout.php><font color=#FFFFFF><- Logout</font></a><br>"; } else { echo "<a href=http://www.net-petz.com/login.php><font color=#FFFFFF>Login -></font></a><br>"; } ?><br>
        <b>.:Explore:.</b><br>
        <a href="http://www.net-petz.com/reg/netlandia.php">
        <font color="#FFFFFF">Netlandia</font></a><br>
        <a href="http://www.net-petz.com/reg/city.php"><font color="#FFFFFF">Net-City</font></a><br><br>
        <b>.:Interact:.</b><br>
        <a href="http://www.net-petz.com/reg/messageboard.php">
        <font color="#FFFFFF">Net-Boards</font></a><br>
        <a href="http://www.net-petz.com/reg/inbox.php"><font color="#FFFFFF">Net-Mail</font></a><br>
        <a href="http://www.net-petz.com/reg/lookups.php"><font color="#FFFFFF">Lookups</font></a><br>
        <a href="http://www.net-petz.com/reg/ushops.php"><font color="#FFFFFF">User Shops</font></a><br><br>
        <b>.:Fun:.</b><br>
        <a href="http://www.net-petz.com/reg/games.php"><font color="#FFFFFF">Game Room</font></a><br>
        <a href="http://www.net-petz.com/reg/stuff.php"><font color="#FFFFFF">Fun Stuff</font></a><br><br>
        <b>.:Options:.</b><br>
        <a href="http://www.net-petz.com/reg/userInfo.php">
        <font color="#FFFFFF">User Options</font></a><br>
        <a href="http://www.net-petz.com/reg/luedit.php"><font color="#FFFFFF">Lookup Options</font></a><br>
        <a href="http://www.net-petz.com/reg/boardpreff.php">
        <font color="#FFFFFF">Board Options</font></a><br><br>
        <b>.:More:.</b><br>
<? if ($preuserID != 0){ echo "<font color=#FFFFFF face=Arial><a href=http://www.net-petz.com/reg/help.php><font color=#FFFFFF>About Us</a>"; } else { echo "<font color=#FFFFFF face=Arial><a href=http://www.net-petz.com/help.php><font color=#FFFFFF>About Us</a>"; } ?><br>
<? if ($preuserID != 0){ echo "<font color=#FFFFFF face=Arial><a href=http://www.net-petz.com/reg/contact.php><font color=#FFFFFF>Contact Us</a>"; } else { echo "<font color=#FFFFFF face=Arial><a href=http://www.net-petz.com/contact.php><font color=#FFFFFF>Contact Us</a>"; } ?></td>
        <td width="92%" height="536"> </td>
      </tr>
    </table>
    </td>
    <td width="1213" height="1002" valign="top" align="center" rowspan="2">
<? include ("secure/randoms.php"); ?>
<? //PAGE CONTENT ?>

  <? //END PAGE CONTENT ?>
</td>
  </tr>
  <tr>
    <td width="270" height="415" valign="top" align="right"> 
    </td>
  </tr>
</table>

</body>

</html>

Link to comment
Share on other sites

I'm assuming that SB3.png is the light blue background column:

 

<div style="background-image:url("SB3.png"); height:600px; height:100px; padding: 10px; text-align:center">
.: Main :.
<!-- Your links go here -->
</div>

 

 

Also, your random background PHP script. Wouldnt it have been better to just name the background image files "SB1_1.png", "SB1_2.png", etc. Then simply have: background=SB1_<?php echo $rand; ?>.png ;)

Link to comment
Share on other sites

Here's my code, is there something wrong in it?:

 

<?
session_start();
$session=session_id( );
include ("secure/config.php"); //WHEN YOU PUT THIS ON THE PAGES ADD A secure/ BEFORE CONFIG.PHP!
?>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
<META NAME="Description" CONTENT="Net-Petz is the newest virtual pet site on the internet. It has fun games, lots of cool petz to adopt, and tons of awesome items! It's completely free!">
<META NAME="Keywords" CONTENT="petz, net, virtual, pets, pet, fun, games, game, ">
</head>
<body>
<? if ($preuserID == 0) {
include ("../oops.htm");
die;
} ?>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="1155" id="AutoNumber1" height="802">
  <tr><td width="1483" height="138" valign="top" align="right" <?
$rand = rand (1,10);
	if ($rand == 1)
		{
			echo "background=SB1_anubis.png";
		}
	elseif ($rand == 2)
		{
			echo "background=SB1_bromaro.png";
		}
	elseif ($rand == 3)
		{
			echo "background=SB1_fang.png";
		}
	elseif ($rand == 4)
		{
			echo "background=SB1_kitachia.png";
		}	
	elseif ($rand == 5)
		{
			echo "background=SB1_coarattla.png";
		}	
	elseif ($rand == 6)
		{
			echo "background=SB1_dragonous.png";
		}	
	elseif ($rand == 7)
		{
			echo "background=SB1_fizz.png";
		}	
	elseif ($rand == 
		{
			echo "background=SB1_woofosa.png";
		}
	elseif ($rand == 9)
		{
			echo "background=SB1_worfoli.png";
		}	
	elseif ($rand == 10)
		{
			echo "background=SB1_lionaya.png";
		}	
?> colspan="2">
    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber3" height="113">
      <tr>
        <td width="15%" height="104" colspan="3" rowspan="3"> </td>
        <td width="31%" height="40"> </td>
        <td width="54%" height="104" rowspan="3"> </td>
      </tr>
      <tr>
        <td width="31%" height="23">
        <p align="center"><b>
        <font color="#FFFFFF" face="Arial" style="font-size: 11pt"><? if ($preuserID != 0){ print "<a href=http://www.net-petz.com/reg/lookup.php?Name=$preuserName><font color=#FFFFFF>$preuserName</a>"; } else { print "Guest"; } ?> - 
        <? if ($preuserID != 0){ print "<a href=http://www.net-petz.com/reg/bank.php><font color=#FFFFFF>$points NPz</a>"; } else { print "0 NPz"; } ?> - <? if ($preuserID != 0 AND $activePetID == 0) { print "No Active Pet"; } elseif ($preuserID != 0){ print "<a href=http://www.net-petz.com/reg/petDetails2.php?monopetID=$activePetID><font color=#FFFFFF>$activePetName</a> is Active"; } else { print "No Active Pet"; } ?></font></b></td>
      </tr>
    </table>
    </td>
  </tr><tr><td>
<div style="background-image:url("SB3.png"); height:600px; height:100px; padding: 10px; text-align:center"><b>
.: Main :.<br>
        </b> <? if ($preuserID != 0){ echo "<font color=#FFFFFF face=Arial><a href=http://www.net-petz.com/reg/home.php><font color=#FFFFFF>Home</a>"; } else { echo "<font color=#FFFFFF face=Arial><a href=http://www.net-petz.com><font color=#FFFFFF>Home</a>"; } ?><br></font>
        <a href="http://www.net-petz.com/reg/mypets.php"><font color="#FFFFFF">My Petz</font></a><br>
        <a href="http://www.net-petz.com/reg/myitems.php"><font color="#FFFFFF">Inventory</font></a><br>
        <? if ($preuserID != 0){ echo "<a href=http://www.net-petz.com/reg/logout.php><font color=#FFFFFF><- Logout</font></a><br>"; } else { echo "<a href=http://www.net-petz.com/login.php><font color=#FFFFFF>Login -></font></a><br>"; } ?><br>
        <b>.:Explore:.</b><br>
        <a href="http://www.net-petz.com/reg/netlandia.php">
        <font color="#FFFFFF">Netlandia</font></a><br>
        <a href="http://www.net-petz.com/reg/city.php"><font color="#FFFFFF">Net-City</font></a><br><br>
        <b>.:Interact:.</b><br>
        <a href="http://www.net-petz.com/reg/messageboard.php">
        <font color="#FFFFFF">Net-Boards</font></a><br>
        <a href="http://www.net-petz.com/reg/inbox.php"><font color="#FFFFFF">Net-Mail</font></a><br>
        <a href="http://www.net-petz.com/reg/lookups.php"><font color="#FFFFFF">Lookups</font></a><br>
        <a href="http://www.net-petz.com/reg/ushops.php"><font color="#FFFFFF">User Shops</font></a><br><br>
        <b>.:Fun:.</b><br>
        <a href="http://www.net-petz.com/reg/games.php"><font color="#FFFFFF">Game Room</font></a><br>
        <a href="http://www.net-petz.com/reg/stuff.php"><font color="#FFFFFF">Fun Stuff</font></a><br><br>
        <b>.:Options:.</b><br>
        <a href="http://www.net-petz.com/reg/userInfo.php">
        <font color="#FFFFFF">User Options</font></a><br>
        <a href="http://www.net-petz.com/reg/luedit.php"><font color="#FFFFFF">Lookup Options</font></a><br>
        <a href="http://www.net-petz.com/reg/boardpreff.php">
        <font color="#FFFFFF">Board Options</font></a><br><br>
        <b>.:More:.</b><br>
<? if ($preuserID != 0){ echo "<font color=#FFFFFF face=Arial><a href=http://www.net-petz.com/reg/help.php><font color=#FFFFFF>About Us</a>"; } else { echo "<font color=#FFFFFF face=Arial><a href=http://www.net-petz.com/help.php><font color=#FFFFFF>About Us</a>"; } ?><br>
<? if ($preuserID != 0){ echo "<font color=#FFFFFF face=Arial><a href=http://www.net-petz.com/reg/contact.php><font color=#FFFFFF>Contact Us</a>"; } else { echo "<font color=#FFFFFF face=Arial><a href=http://www.net-petz.com/contact.php><font color=#FFFFFF>Contact Us</a>"; } ?></td>
        </div>
      </tr>
    </table>
    </td>
    <td width="1213" height="1002" valign="top" align="center" rowspan="2">
<? include ("secure/randoms.php"); ?>
<? //PAGE CONTENT ?>

  <? //END PAGE CONTENT ?>
</td>
  </tr>
  <tr>
    <td width="270" height="415" valign="top" align="right"> 
    </td>
  </tr>
</table>

</body>

</html>

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.