Enjoy an ad free experience by logging in. Not a member yet?
Register .
11-02-2011, 10:38 PM
PM User |
#1
New Coder
Join Date: Nov 2011
Posts: 27
Thanks: 7
Thanked 0 Times in 0 Posts
Site Browser Problems
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 <- not always online
PHP Code:
<!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:
Code:
/*--------------------------------------------------------------------------------------------*/
/*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*/
/*--------------------------------------------------------------------------------------------*/
Last edited by epxine; 11-03-2011 at 06:20 PM ..
11-03-2011, 10:54 AM
PM User |
#2
New Coder
Join Date: Oct 2011
Location: London, UK
Posts: 12
Thanks: 2
Thanked 2 Times in 2 Posts
to center the page, write in .container:
Code:
margin-left: auto;
margin-right: auto;
11-03-2011, 11:31 AM
PM User |
#3
Regular Coder
Join Date: Sep 2011
Posts: 286
Thanks: 3
Thanked 33 Times in 33 Posts
Live Preview link doesn't work due to time-out. Also, which doctype tag do you have?
11-03-2011, 04:25 PM
PM User |
#4
Senior Coder
Join Date: Aug 2010
Location: High Point, NC
Posts: 3,325
Thanks: 5
Thanked 363 Times in 360 Posts
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.
__________________
Teed
11-03-2011, 06:23 PM
PM User |
#5
New Coder
Join Date: Nov 2011
Posts: 27
Thanks: 7
Thanked 0 Times in 0 Posts
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.
11-03-2011, 06:33 PM
PM User |
#6
Master Coder
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Hello epxine,
I think a good place for you to start would be to fix some of these errors -
http://validator.w3.org/check?verbos...x.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
two
three
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
Users who have thanked Excavator for this post:
Jump To Top of Thread
Thread Tools
Rate This Thread
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
All times are GMT +1. The time now is 05:55 PM .
Advertisement
Log in to turn off these ads.