html - Same height divs? -
i have following:
<div class="container"> <div class="sectiona"> </div> <div class="sectionb"> </div> </div>
section has red background, section b has blue background.
section has lots of text in it, making quite tall, section b not have text in it.
how can make section , b same height parent?
yes, can give childs same heights parent. work:
<html> <head> </head> <body> <div class="container"> <div class="sectiona">lorem ipsum dolor sit amet. </div> <div class="sectionb">lorem ipsum dolor sit amet. </div> </div> </body> </html>
the css:
.container{height:200px;width:500px;overflow:hidden} .sectiona{position:relative;float:left;width:250px;background:blue;height:100%} .sectionb{position:relative;float:left;width:250px;background:red;height:100%}
Comments
Post a Comment