一部の CSS に問題があります
変数の動的な高さを持つN 個の外部 div があります。
すべての外部 div には 1 つの内部 div があり、これは外部 div の下部にある必要があります。
それで、 How do I align a inner div with the bottom of an outer div? のように絶対位置でトリックを使用しますか? 不可能です。
私はあなたが遊ぶための jsfiddle を作りました:
http://jsfiddle.net/xSTtp/4/
HTML:
<div class="outside">
<div class="inside">
xyz
</div>
</div>
<div class="outside">
<div class="inside">
xyz
</div>
</div>
CSS:
.outside {
/* the height will be dynamic, 100px is just for the demo */
height: 100px;
border: 1px solid green;
}
.inside {
border: 1px solid red;
/* not working*/
/* display: table-cell;
vertical-align: bottom;
*/
/* i want the red at the bottom of the green, not in the page */
position: absolute;
bottom: 0;
}
ありがとうヨルグ