I have a sidebar that I have positioned absolutely to the right for several reasons. But the problem is that if I have a shorter main content area, the sidebar extends past the content.
Is there a way with CSS that we can get the container to wrap its height around the sidebar (if the sidebar is longer)?
Please this jsFiddle: http://jsfiddle.net/52jjp/
It’s not easy to ‘clear’ absolutely positioned elements. One way I found of doing it is to get the height in jquery, then apply that height to the container. For example:
$('#container').height($('#ab_positioned').height());