...

View Full Version : Site Browser Problems



epxine
11-02-2011, 10:38 PM
This is the problem i got:
http://img714.imageshack.us/img714/6764/notlikethis.png

I want it to look like this:
http://img46.imageshack.us/img46/2100/thisok.png


Live Preview (http://epx.no-ip.org/) <- not always online



<!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" xml:lang="en" lang="en" dir="ltr">
<html>
<title>Epx Gaming NEW!</title>
<link href="css/style.css" rel="stylesheet" type="text/css" media="all" />
<head>
<body>

<div class="container">

<center>
<?php include("navigation_menu.php"); ?>


<div class="header">
</div> <!-- end .header -->
</center>

<?php include("clock.php"); ?>

<div id="left-panel">

<div class="guide">
<p>this is what you do</p>
</div> <!-- end .guide -->

<div class="hks">
<p>123 hks</p>
</div> <!-- end .hks -->


</div><!-- end #left-panel -->

<center>
<div id="center-panel">

<div class="slider">
</div> <!-- end .slider -->

<div class="news">
<p><h1>website is currently under development.</h1></p>
<div class="admin-text">
<p>Lorem ipsum nanana</p>
</div> <!-- end .admin-text -->
</div> <!-- end .news -->



</center>
</div><!-- end #center-panel -->



<div id="right-panel">

<div class="user">
</div> <!-- end .guide -->


</div><!-- end #right-panel -->









</div><!-- end #container -->

</body>
</head>
</html>


Css:


/*--------------------------------------------------------------------------------------------*/
/*Layout Settings*/
/*--------------------------------------------------------------------------------------------*/


/*place all layout settings here*/



body {
font: 100%/1.4 Verdana, Arial, Helvetica, sans-serif;
color: #d5d5d5;
background-color: #404040;
}

.container {
margin-left: auto;
margin-right: auto;
}

a:link {
color:#414958;
}

a:visited {
color: #4E5869;
}

a:hover, a:active, a:focus {
text-decoration: none;
color: #bbf60b;
}

/*place all layout settings here*/

/*--------------------------------------------------------------------------------------------*/
/*Text Settings*/
/*--------------------------------------------------------------------------------------------*/

/*place all text settings here*/



h1, h2, h3, h4, h5, h6, p {
margin-top: 0px;
padding-right: 5%;
padding-left: 0%;
text-align: left;
}


div.admin-text {
color: #0099FF
}

/*place all text settings here*/

/*--------------------------------------------------------------------------------------------*/
/*Left Panel*/
/*--------------------------------------------------------------------------------------------*/

#left-panel {
margin:auto;
width:100%;
}
/*place all left divs here*/



.guide {
background-image: url(../images/guide.png);
width: 369px;
height: 335px;
}

.hks {
background-image: url(../images/hks.png);
width: 373px;
height: 538px;
}


/*place all left divs here*/

/*--------------------------------------------------------------------------------------------*/
/*Center Panel*/
/*--------------------------------------------------------------------------------------------*/

#center-panel {
margin:auto;
width:60%;
}
/*place all center divs here*/



.header {
background-image: url(../images/header.png);
width: 1900px;
height: 308px;
}

.slider {
background-image: url(../images/slider.png);
width: 1050px;
height: 220px;
}

.news {
background-image: url(../images/news.png);
width: 1050px;
height: 341px;
}



/*place all center divs here*/

/*--------------------------------------------------------------------------------------------*/
/*Right Panel*/
/*--------------------------------------------------------------------------------------------*/

#right-panel {
margin:auto;
width: 0%;
}

/*place all right .divs here*/



.user {
background-image: url(../images/user.png);
width: 369px;
height: 335px;
}


/*place all right .divs here*/

/*--------------------------------------------------------------------------------------------*/

sac
11-03-2011, 10:54 AM
to center the page, write in .container:


margin-left: auto;
margin-right: auto;

Frankie
11-03-2011, 11:31 AM
Live Preview link doesn't work due to time-out. Also, which doctype tag do you have?

teedoff
11-03-2011, 04:25 PM
Not exactly sure what you're trying to do. But I'm guessing you want that image centered and full width. The problem is you have leftPanel ABOVE your header code, as well as center panel that has a width of 60%. That specifically is what's pushing your header image to the right.

If I'm way off base, please provide more detail on what you want your page to look like.

epxine
11-03-2011, 06:23 PM
i started over and cleaned things up abit, i edit the php/css code in my first post and addes images, the live url works, it is just that im not hosting it 24/7.

yes i would like the whole design to be centered on the page and not have any movements of the pictures(the black background bars) to left/right whenever i zoom in.

Also want it to look the same in all browsers.

Excavator
11-03-2011, 06:33 PM
Hello epxine,
I think a good place for you to start would be to fix some of these errors - http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fepx.no-ip.org%2F

Then you might try to use a 3 column layout that works as an example of how to lay yours out. Look at a couple different ones here:
one (http://nopeople.com/CSS%20tips/simple3column/index.html)
two (http://www.alistapart.com/articles/holygrail/)
three (http://matthewjamestaylor.com/blog/perfect-3-column.htm)

As far as centering goes...
To center an element you need three things:

a valid DocType
an element with a width
that elements right/left margins set to auto



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum