我有一個div #parent
具有min-height:400px;
展開一個div到其父容器的底部
這個div包含2個孩子的div,最後,我想下擴大到其父的底部,儘管內容的數量。
父母的身高是流動的,因爲內容可能很多或很小。
<div id="parent">
<div id="child1"><!-- content here --> </div>
<div id="child2><!-- this div should stretch down to bottom of parent container--></div>
</div>
#parent{min-height:400px;}
這是在所有可能的 - 我不能使用任何JS黑客
如果它與[你的上一個問題]有什麼關係(http://stackoverflow.com/questions/5154149/min-height-with-absolute-positioning/5154462#5154462),它不會發生*與帶有兩個可變高度元素的純CSS。 – thirtydot 2011-03-01 13:33:54