How to make the block wrap the child elements?

I think everyone is faced with this problem, when a block does not wrap around the content. Often helps or overflow hidden float left.
In my case, the hidden cannot be used, since outside the block of content displayed absolute positioning. And float left. also not suitable because the block has margin: 0 auto;

In such a situation how do you cope with the task?
August 19th 19 at 23:00
1 answer
August 19th 19 at 23:02
Solution
.clear
.clear:after,
.clear:before{
content:"";
display:table;
clear:both;
}

to apply, you can :
<div class="clear parent"> 
 <div class></div> in css to give it a float:left;
 <div class></div> in css to give it a float:left;
 </div>


either add an empty block with class="clear" :
<div class="main"> 
 <div class></div> in css to give it a float:left;
 <div class></div> in css to give it a float:left;
</div>
<div class="clear"></div>

Find more questions by tags CSS