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 7 of 7

Thread: layout problem

  1. #1
    New Coder
    Join Date
    Jun 2006
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    layout problem

    Hi,

    The pic below is my template iv made. Im having problems laying it out. At the moment it show the left side of it correctly then the right side belowin, like on another page.

    Also once iv fixed that how would i make the content box expand with the amount of text.



    Code:
    body
    {
    background: #FFFFFF;
    margin: 0;
    font-family: "Verdana";
    font-size: 11px;
    }
    
    #container
    {
    text-align: left;
    width: 900px;
    height: 100%;
    margin: auto;
    overflow: hidden;
    border-left: 0px solid #999999;
    border-right: 0px solid #999999;
    }
    
    #leftside
    {
    width: 100%;
    height: 776px;
    float: left;
    background: url('images/leftside.jpg') top left no-repeat;
    }
    
    #rightside
    {
    width: 100%;
    height: 776px;
    float: right;
    background: url('images/rightside.png') top right no-repeat;
    }
    
    #header
    {
    width: 100%;
    height: 178px;
    background: url("images/header.jpg") top no-repeat;
    }
    
    #headerbar
    {
    width: 100%;
    height: 21px;
    background: url('images/headerbar.jpg') top no-repeat;
    }
    
    #nav
    {
    width: 100%;
    height: 27px;
    background: url('images/nav.jpg') top right no-repeat;
    }
    
    #sidenav
    {
    width: 100%;
    height: 577px;
    margin-left: 26px;
    background: url('images/sidenav.png') top left no-repeat;
    }
    
    #content
    {
    width: 100%;
    height: 550px;
    background: url('images/content.png') top no-repeat;
    }
    
    #footer
    {
    width: 100%;
    height: 84px;
    background: url('images/footer.jpg') bottom no-repeat;
    }
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html>
    <head>
    <title>Revolution-Creations</title>
    <link href="style.css" rel="stylesheet" type="text/css"/>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    </head>
    <body>
    <div id="container">
    <div id="leftside">
    </div>
    <div id="header">
    </div>
    <div id="rightside">
    </div>
    <div id="headerbar">
    </div>
    <div id="sidenav">
    </div>
    <div id="nav">
    </div>
    <div id="content">
    </div>
    <div id="footer">
    </div>
    
    </div>
    </body>
    </html>

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,667
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Goodmorning wings,
    If you make these changes in your CSS your right column will come up next to your left. You may have to adjust px sizes since I'm guessing at the size of your images.
    Code:
    #leftside
    {
    width: 200px;
    /*height: 776px; delete this*/
    float: left;
    background: url('images/leftside.jpg') top left no-repeat;
    }
    
    #rightside
    {
    margin-left: 200px;
    /*width: 100%; delete this*/
    /*height: 776px; delete this*/
    /*float: right; delete this*/background: url('images/rightside.png') top right no-repeat;
    }
    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

  • #3
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,667
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Still looking at that Wings, you've got a lot of 100% widths on everything. I think you'll need to adjust that as well as the order your placing your divs.
    Just to demonstrate what I mean, have a look at this:
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html>
    <head>
    <title>Revolution-Creations</title>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    <style type="text/css">
    body
    {
    background: #FFFFFF;
    margin: 0;
    font-family: "Verdana";
    font-size: 11px;
    }
    
    #container
    {
    	text-align: left;
    	width: 900px;
    	height: 100%;
    	margin: auto;
    	overflow: hidden;
    	border-left: 0px solid #999999;
    	border-right: 0px solid #999999;
    	background-color: #666666;
    }
    
    #leftside
    {
    	width: 200px;
    	float: left;
    	background-color: #00FF00;
    	background-image: url(images/leftside.jpg);
    	background-repeat: no-repeat;
    	background-position: left top;
    }
    
    #rightside
    {
    	margin: 0 0 0 200px;
    	background-color: #FF0000;
    	background-image: url(images/rightside.png);
    	background-repeat: no-repeat;
    	background-position: right top;
    }
    
    #header
    {
    	width: 100%;
    	height: 178px;
    	background-color: #FFCC00;
    	background-image: url(images/header.jpg);
    	background-repeat: no-repeat;
    	background-position: top;
    }
    
    #headerbar
    {
    	width: 100%;
    	height: 21px;
    	background-color: #996699;
    	background-image: url(images/headerbar.jpg);
    	background-repeat: no-repeat;
    	background-position: top;
    }
    
    #nav
    {
    	width: 100%;
    	height: 27px;
    	background-color: #CCCCFF;
    	background-image: url(images/nav.jpg);
    	background-repeat: no-repeat;
    	background-position: right top;
    }
    
    #sidenav
    {
    	width: 100%;
    	height: 577px;
    	margin-left: 26px;
    	background-color: #003399;
    	background-image: url(images/sidenav.png);
    	background-repeat: no-repeat;
    	background-position: left top;
    }
    
    #content
    {
    	width: 100%;
    	height: 550px; /*delete that line and #content will grow/shrink accordinng to what's in it.
    	background-color: #CCFFFF;
    	background-image: url(images/content.png);
    	background-repeat: no-repeat;
    	background-position: top;
    }
    
    #footer
    {
    	width: 100%;
    	height: 84px;
    	background-color: #FF00FF;
    	background-image: url(images/footer.jpg);
    	background-repeat: no-repeat;
    	background-position: bottom;
    }
    </style>
    </head>
    <body>
    <div id="container">
    <div id="header">header</div>
    <div id="headerbar">headerbar</div>
    <div id="leftside">leftside</div>
    <div id="rightside">rightside</div>
    <div id="sidenav">sidenav</div>
    <div id="nav">nav</div>
    <div id="content">content</div>
    <div id="footer">footer</div>
    </div>
    </body>
    </html>
    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

  • #4
    New Coder
    Join Date
    Jun 2006
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ok iv done all the above and it still not quite right. Why are tables ok. There alot f***** easyier lol, wouldnt done it by now.

  • #5
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,667
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Quote Originally Posted by wings View Post
    ok iv done all the above and it still not quite right. Why are tables ok. There alot f***** easyier lol, wouldnt done it by now.
    Give us a look at what you've got so far. It would be a LOT easier if you'd link us to a test site so we can have your images available.

    You can use tables if you want... no law says you can't. Did you read the link in my sig that tells why not? If none of that matters to you then go ahead.
    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

  • #6
    New Coder
    Join Date
    Jun 2006
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    link

    Click the link to see it.

  • #7
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,667
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Just a start: http://www.nopeople.com/wings/ background needs edited so it will tile seamlessly...doesn't validate yet...
    just ran out of time.
    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


  •  

    Posting Permissions

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