i have a container div which is position:relative and the squares are position:absolute because i want to play with their positions.

Like what you see, the container does not fit the content except if the squares are positioned in Relative, is there a solution for this?
I don’t want to just set the height for container because the squares are not static so i want something that resizes automatically.
Thanks
Unfortunately it is not possible to contain absolute positioned elements..
They are taken completely out of the normal flow, so nothing knows how to wrap around them..