Reputation: 636
I have to appends divs into another div with position absolute(can't be relative) to the bottom, the code looks like
<div style="position:aboslute; top:100px; left:200px; height:500px">
<div style="height:20px">Example 1</div>
<div style="height:2px">Example 2</div>
</div>
Solutions?
Upvotes: 0
Views: 81
Reputation: 167182
Give relative
position to parent and absolute
position to children.
<div style="position:aboslute; top:100px; left:200px; height:500px">
<div style="height:20px; position: absolute; bottom: 0;">Example 1</div>
<div style="height:2px; position: absolute; bottom: 0;">Example 2</div>
</div>
Check out the fiddle here: http://jsfiddle.net/vLn32/
Upvotes: 1