This is my situation
HTML
-
You can use display:table-cell property for this. and remove float:left
write like this:
#item1, #item2
{
display:table-cell;
}
Check this http://jsfiddle.net/59qEt/5/
Note it's work till IE8 & above.
讨论(0)
-
remove the item2 from css
`
<div id="item1">
<div class="empty"> </div>
<div class="empty"> </div>
<div class="empty"> </div>
</div>
<div id="item1">
<div class="empty"> </div>
</div>
`
讨论(0)
-
in item 1 you are using 3 div
each div
with padding:10px;
and in item 2 just 1 div
you can do 2 thing 1 in item 2 add 3 div
and option 2. apply height
on item 2 and item 2 child empty
讨论(0)
-
You can try something like this:
#item2 > div {
padding-bottom:200px;
}
Here's the fiddle for this :
http://jsfiddle.net/59qEt/24/
讨论(0)
-
Just add two string of JavaScript http://jsfiddle.net/59qEt/20/
Works in all browsers
讨论(0)
- 热议问题