cpkid2
11-10-2009, 09:21 PM
http://img41.imageshack.us/img41/9028/samplen.gif
I have this laid out on a 12 column grid. Basically, I want to stretch the length of the left div (.grid_4) to the same height as the div to the right without giving it a height attribute since the height of the right div (.grid_8) will always grow or shrink with content. Also, I want to vertically center the h2 element inside that first div.
HTML
<div class="containerdiv">
<div class="grid_4">
<h2>"Lorem Ipsum Lorem Ipsum"</h2>
</div>
<div class="grid_8">
Lorem Ipsum Lorem IpsumLorem Ipsum Lorem IpsumLorem Ipsum Lorem IpsumLorem Ipsum Lorem Ipsum
</div>
</div>
CSS
.containerdiv {
border-bottom:1px solid #EFEFEF;
margin-bottom:30px;
overflow:hidden;
}
.grid_4 {
display:inline;
float:left;
margin-left:10px;
margin-right:10px;
position:relative;
width:300px;
}
.grid_8 {
display:inline;
float:left;
margin-left:10px;
margin-right:10px;
position:relative;
width:620px;
}
Please help if you can. Thanks.
I have this laid out on a 12 column grid. Basically, I want to stretch the length of the left div (.grid_4) to the same height as the div to the right without giving it a height attribute since the height of the right div (.grid_8) will always grow or shrink with content. Also, I want to vertically center the h2 element inside that first div.
HTML
<div class="containerdiv">
<div class="grid_4">
<h2>"Lorem Ipsum Lorem Ipsum"</h2>
</div>
<div class="grid_8">
Lorem Ipsum Lorem IpsumLorem Ipsum Lorem IpsumLorem Ipsum Lorem IpsumLorem Ipsum Lorem Ipsum
</div>
</div>
CSS
.containerdiv {
border-bottom:1px solid #EFEFEF;
margin-bottom:30px;
overflow:hidden;
}
.grid_4 {
display:inline;
float:left;
margin-left:10px;
margin-right:10px;
position:relative;
width:300px;
}
.grid_8 {
display:inline;
float:left;
margin-left:10px;
margin-right:10px;
position:relative;
width:620px;
}
Please help if you can. Thanks.