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 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jan 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    streching side columns to the bottom of the page

    hello

    first of all im new to css, i have always done table layouts, untill now, im trying to learn to do them on css, and this is my frist attempt:

    im trying to do a 3 colum layout where the left and right colum streches as much as the central colum, the central colum that has all the data

    i want to do a image repetition on the side colums that blends in with the background, im not putting any kind of text on them, but, they doesnt seem to strech even if set the height to 100%

    if i leave it at 100% and i input a long text, the sides colum streching stops and leaves the text alone

    this is my css:

    Code:
    html, body{
    	height:100%;
    	margin:0;
    	padding:0;
    	}
    #main960container
    {
    border: 10px solid #FF00FF;
    width:960px;
    margin:auto;
    height:100%
    
    	}
    .header {
    	background: yellow;
    	width:800px;
    	}
    .l_container
    {
    	width:70px;
    	background-color:#FF0000;
    	height:100%;
    	float:left;
    
    }
    .r_container
    {
    	width:70px;
    	background:#0000FF;
    	height:100%;
    	float:left;
    
    }
    .container{
    width:800px;
    float:left;
    }
    .footer {
    	width:800px;
    	background: #A2A2A2;
    	margin:auto;
    	}
        </style>
    <head>
    and this is my html:

    Code:
    <div id="main960container">
    <div class="l_container">side A</div>
    <div class="container">
    <div class="header">HEADER</div>
    <p>
    
    long text goeshere
        </p>
     <div class="footer"> FOOTER </div>
    </div>
    <div class="r_container">SIDE B</div>
    
    </div>
    thanks for your help

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,671
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello whitepython,
    See if this layout will work better for you - http://nopeople.com/CSS/3-column/index.html

    If not, there are plenty of equal height 3 column layouts available.
    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
    •