Problem stretching the content around a parent div
I'm learning html and css, and I always use clear:both at the end of a container to strech it. However since the parent div has a margin child, it does not stretch. Could anybody explaim me why, and how to solve it?
here is how my css looks:
margin: 50px auto auto auto;
I want the the container to expand around the block and blue.square, but since both div contain margin it does not expand. If I remove the margin the ccs file it expands, but it doesnt expand with the margin. I want to know how i can expand the container while keeping margin.