Im here because other similar questions could not help my specific problem.
I need the right div be 100% of the height all the time where the height of the parent depends on the height of the left div , which depends on the content inside.
Here is the html:
<div class="container clearfix"> <div class="left"></div> <div class="right"></div> </div>
Here is the CSS:
.container{ min-height: 10px; width: auto; height: auto; background-color: #eeeeee; } .left{ position: relative; float: left; min-height: 100px; width: 50px; background-color: #dddddd; } .right{ min-height: 20px; position: relative; float: left; height: 100%; width: 50px; background-color: #dddddd; } . .clearfix:after { content: "."; display: block; clear: both; visibility: hidden; line-height: 0; height: 0; } .clearfix { display: inline-block; }
Note:
I am using clearfix .
And if you can show your answer in jsfiddle
Here is jsFiddle http://jsfiddle.net/C9Kmx/32/
html css
skmasq
source share