Clearfix with absolute positioned elements
问题 My problem is the following: The border does not wrap the containing items. I know this is because I position the content-item absolute, but I need them to be absolute for the layout to work. This also means that I cannot use the clearfix solution (this means that I have to float the elements, which it not an option). So my question is, how to I get the parent div to get the height of the contained elements. EDIT: No Javascript solution, CSS only Html: <div class="mask"> <div id="content-1"