treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Fixed height in 2 column divs

  • Hi,
    Am new to CSS and I have been trying for the past couple hours to create a stretchable height with two columns. I would appreciate it if someone could tell me what is it am doing is wrong.

    Here is my HTML code

    					<div class=\"two_cols\">
    <div class=\"left-col\">
    test
    </div>
    <div class=\"right-col\">
    test
    </div>
    </div>


    and this is what i wrote for the CSS


    .two_cols {
    position: relative;
    min-height: 100%;
    margin: 0 auto;
    border: 1px solid black;
    }
    .two_cols .left-col {
    position: absolute;
    left:0;
    }
    .two_cols .right-col {
    position: absolute
    right: 0;
    }


    the border i set in .two_cols shows a thin line, as if the right and left elements are not being contained inside the div. Any idea how could i solve this?
  • please, anyone?