Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #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.

  • #2
    sac
    sac is offline
    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;

  • #3
    Regular Coder
    Join Date
    Sep 2011
    Posts
    339
    Thanks
    3
    Thanked 35 Times in 35 Posts
    Live Preview link doesn't work due to time-out. Also, which doctype tag do you have?

  • #4
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,338
    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

  • #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.

  • #6
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 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:
    1. a valid DocType
    2. an element with a width
    3. that elements right/left margins set to auto
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • Users who have thanked Excavator for this post:

    epxine (11-03-2011)


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •