This is my situation
HTML
<div id="content">
<div id="item1">
<div class="empty"> </div>
<div class="empty"> </div>
<div class="empty"> </div>
</div>
<div id="item2">
<div class="empty"> </div>
</div>
</div>
CSS
.empty
{
width: 100px;
height: 100px;
background-color: red;
}
#item1
{
float: left;
padding: 10px;
background-color: green;
}
#item2
{
float: left;
padding: 10px;
background-color: blue;
}
#content
{
padding: 10px;
background-color: pink;
overflow: hidden;
}
This looks that http://jsfiddle.net/59qEt/3/
So my question is: How I must set my styles to #item2 has the same height which #item1 have?
Any help would be appreciated.
You can use display:table-cell property for this. and remove
float:leftwrite like this:Check this http://jsfiddle.net/59qEt/5/
Note it’s work till IE8 & above.