これは、Flexプロパティを使用して行うことができます。
フィドル:https://jsfiddle.net/9vq8nkpc/
HTML
<div id="container">
<div id="top">
top variable height
</div>
<div id="bottom">bottom variable heighbottom variable heightbottom variable heightbottom variable heightbottom variable heightbottom variable heightbottom variable heightbottom variable heightbottom variable heightbottom variable heightbottom variable heightbottom variable heightbottom variable heightbottom variable heightbottom variable heightbottom variable heightbottom variable heightbottom variable heightbottom variable heightt</div>
</div>
CSS
#container {
border: 1px solid red;
height: 200px;
position: absolute;
display:flex;
flex-direction:column;
justify-content:space-between;
}
#top, #bottom {
border: 2px solid red;
background: #ccc;
width:80%;
display: inline-block;
}
を、あなたは# 'の高さの後に'#のcontainer'の内部に残っているの幅を占有するために '#のbottom'をしたいですトップ 'を考慮に入れましたか? – BenM
私は、css pieやその他のような追加のjqueryを使わなくてもIE8でどんな解決策も動作しなければならないことを忘れていました。 – Adyyda