I’m trying to position div as a footer inside parent div.
<div>
...some content...
<div id='footer'>
<span style='float:left'>Left text</span>
<span style='float:right'>Right text</span>
</div>
</div>
Now left and right elements are ok, but the footer div does not align to the bottom of the containing div, but to the bottom of its content.
But if i try putting position:absolute for the footer, it looses grasp on the parent’s div width and thus left and right spans go one right after the other.
http://jsfiddle.net/ch4Hw/
Use
position:relative;on the container andposition:absolute; bottom:0; height:auto;on footer.