I need to fit the height of my right bar to the height of its parent div. The parent's div height depends on oth开发者_高级运维er div content. I read this thread 4793540 and found it useful for firefox and IE>=8 but older versions of IE make my bar dissapear. Can you help me whith this?
HTML
<div id="body">
<div id="content"></div>
<div id="bar"></div>
<div id="trick"></div>
</div>
CSS
#body {
padding:10px;
padding-bottom:60px;
width:960px;
margin-top: 20px;
margin-left:auto;
margin-right:auto;
position: relative;
}
#bar {
width: 100px;
float:right;
position: absolute;
top:0;
left: 870px;
bottom:0;
overflow: hidden;
padding: 10px 0;
}
#body, #bar {
min-height: 250px;
height: auto !important;
height: 250px;
}
#content {
width:850px;
float:left;
}
#trick {
width:960px;
height:20px;
clear: both;
}
The site online is http://jazg.net/naiset/
Remove float: left
on #content
.
It makes no difference in other browsers but fixes IE7.
精彩评论