How can i center my webpage(when zoom in zoom out) putting container not work

[php]

Citigate Travel Plus <?php include 'layoutbasic.php'; require_once("connect.php"); session_start(); $page="homepage.php"; $status = $_SESSION['status']; $position=""; $featuredspot = array(); $slideshow = mysql_query("select * from tblhomepageslideshow ORDER BY ID DESC "); while($r=mysql_fetch_array($slideshow)) { array_push($featuredspot, $r[1]); } ?>

<div class="current">
	<img src="<?php echo $featuredspot[0]?>" alt="Photo Gallery" width="700" height="280" class="gallery"/>
</div>
<div>
	<img src="<?php echo $featuredspot[1]?>" alt="Photo Gallery" width="700" height="280" class="gallery"/>
</div>
<div>
	<img src="<?php echo $featuredspot[2]?>" alt="Photo Gallery" width="700" height="280" class="gallery"/>
</div>
<div>
	<img src="<?php echo $featuredspot[3]?>" alt="Photo Gallery" width="700" height="280" class="gallery"/>
</div>
<div>
	<img src="<?php echo $featuredspot[4]?>" alt="Photo Gallery" width="700" height="280" class="gallery"/>
</div>
<?php if($status==1) { $email = $_SESSION['email']; $check = mysql_query("select * from tblmember where emailadd = '$email' "); $row1 = mysql_fetch_assoc($check); $fname = $row1['firstname']; $position = $row1['status']; echo "
"; echo "

Hello, $fname

"; echo "
"; } else{ echo "
"; echo "

Citigate Travel Plus

"; echo "
"; } include 'layoutmenus.php'; ?>
<?php $per_page = 4; $start = $_GET['start']; $record_count = mysql_num_rows(mysql_query("SELECT * FROM tblpromopackages")); $max_pages = $record_count / $per_page; $promo = mysql_query("select * from tblpromopackages LIMIT $start, $per_page"); $x=500; $y=410; $picture=0; while($row=mysql_fetch_array($promo)) { $id = $row[0]; $pname = $row[1]; $pprice = $row[2]; $image = $row[3]; echo "
"; echo"
"; echo "$pname"; echo ""; echo "
"; echo ""; echo ""; echo ""; echo ""; echo"
"; if($position=="admin") { $a=$x-8; $b=$y-8; echo "
"; echo "[Edit]"; echo"
"; $a=$x-8; $b=$y+180; echo "
"; echo ""; echo"
"; } if($picture<1) { $y = $y+250; $picture=$picture+1; } else { $picture=0; $y=410; $x=$x+210; } } if($position=="admin"){ echo "
"; echo "[Add]"; echo"
"; echo "
"; echo "[Add]"; echo"
"; } if($max_pages>1){ echo "
"; echo "
    "; $prev = $start - $per_page; $next = $start + $per_page; if ($start>0){ echo " prev "; ?>
		<script type="text/javascript">

		window.scrollTo(0,450);

		</script>
		<?php
		}

$i=1;
for ($x=0;$x<$record_count;$x=$x+$per_page)
{
	 if ($start!=$x)
		echo "<a href='homepage.php?start=$x'>$i</a> ";
	 else
		echo "<a href='homepage.php?start=$x'><b>$i</b></a>";
	 $i++;
}


if ($start<$record_count-$per_page)
	   echo "<a href='homepage.php?start=$next'>next</a>";
	   

echo "</ul>";
echo"</div>";	
}

?>

[/php]

Posting the CSS you are using might give some idea what is happening as well.

And please use code tags.

And here is a great reference for everything css, and this article for CSS Centering:

here’s my CSS sir.

body
{
background-image:url(‘bgcolor.png’);
padding:0px;
margin: 0px;
}

#logo
{
position:absolute;
top:20;
left:240;
width:120px;
}

#bg1
{
position:fixed;
top:0px;
left:180px;
}

#cloud
{
position:absolute;
top:3px;
left:190px;
width:980px;
height:120px;
}

#seperators
{
position:absolute;
top:130px;
left:190px;
width:980px;
}

#btnHome
{
position:absolute;
width:45;
top:138px;
left:190px;
}

#btnPaS
{
position:absolute;
top:2px;
left:2px;
width:200;
}

#btnGallery
{
width:70;
position:absolute;
top:138px;
left:453px;
}

#btnAboutUs
{
position:absolute;
width:80;
top:2px;
left:2px;
}

#btnDownloads
{
width:55;
position:absolute;
top:138px;
left:622px;
}

#inquiry
{
position:absolute;
top:160px;
left:915px;
}

#operator
{
position:absolute;
top:260px;
left:915px;
}

#promo
{
position:absolute;
top:435px;
left:360px;
width:550px;
height:540px;
}

#ads
{
position:absolute;
top:470px;
left:175px;
height:400px;
}

#footer
{
position:absolute;
top:1000px;
left:0px;
width:1348px;
}

#txtUsername
{
position:absolute;
top:14px;
left:760px;
}

#txtPassword
{
position:absolute;
top:14px;
left:900px;
}

#btnLogin
{
position:absolute;
top:20px;
left:1050px;
width:60px;
}

#btnfpass
{
position:absolute;
top:100px;
left:903px;
}

#chatbox
{
position:absolute;
top:370px;
left:912px;

}

#mask{
position:absolute;
top:0px;
left:0px;
height:150%;
width:100%;
display:none;
background-color: black;
}

.modal_window{
    position:absolute; /* important so we can position it on center later */
    display:none; /* don't show it */
    
    /* styling bellow */
    color:white;
}

/* style a specific modal window  */
#modal_window{
    padding:50px;
    border:1px solid gray;
	background-image:url('bgcolor.png');
	width:500px;
	height:100px;
    color:black;
	font-family:calibri;
	font-size:20px;
}
a.activate_modal{
text-decoration:none;
color:black;
font-family:calibri;
font-size:20px;

position:absolute;
top:600px;
left:1150px;
}

#photoShow{
height:400px;
width:400px;
position:absolute;
top:160px;
left:190px;
}
#photoShow div{
position:absolute;
opacity:.0;
}
#photoShow div.previous{
position:absolute;
opacity:0.0;
}
#photoShow div.current{
position:absolute;
opacity:1.0;
}

.paginate. { font-weight: bold; height:10;}

.paginate a
{
display: block;
float: left;
font-size:10;
color: #585858;
text-decoration: none;
padding: 6px 11px;
margin-right: 6px;
border-radius: 3px;
border: 1px solid #ddd;
background-color: #eee;
background-image: -webkit-gradient(linear, left top, left bottom, from(#f7f7f7), to(#eee));
background-image: -webkit-linear-gradient(top, #f7f7f7, #eee);
background-image: -moz-linear-gradient(top, #f7f7f7, #eee);
background-image: -ms-linear-gradient(top, #f7f7f7, #eee);
background-image: -o-linear-gradient(top, #f7f7f7, #eee);
background-image: linear-gradient(top, #f7f7f7, #eee);
-webkit-box-shadow: 2px 2px 4px -1px rgba(0,0,0, .55);
-moz-box-shadow: 2px 2px 4px -1px rgba(0,0,0, .55);
box-shadow: 2px 2px 4px -1px rgba(0,0,0, .55);
}

.paginate a:hover {
color: #3280dc;
}

.paginate a:active {
position: relative;
top: 1px;
-webkit-box-shadow: 1px 1px 3px -1px rgba(0,0,0, .55);
-moz-box-shadow: 1px 1px 3px -1px rgba(0,0,0, .55);
box-shadow: 1px 1px 3px -1px rgba(0,0,0, .55);
}

.paginate .single, .paginate .current {
display: block;
float: left;
padding: 6px 11px;
padding-top: 8px;
margin-right: 6px;
border-radius: 3px;
color: #676767;
}

#package
{
position:absolute;
top:230;
left:590;
}

#package1
{
position:absolute;
top:230;
left:380;
}

#packagebox
{
position:absolute;
top:180;
left:280;
width:800;
height:800;
}

#searchbg
{
position:absolute;
top:180;
left:280;
width:800;
}

#register
{
position:absolute;
top:47;
left:828;
}

#forgot
{
position:absolute;
top:47;
left:905;
}

Sponsor our Newsletter | Privacy Policy | Terms of Service