Say you have a div, give it a definite width and put elements in it, in my case an img and another div.
div
width
img
The idea
Here's more modern approach:
.parent {display: flow-root;}
No more clearfixes.
p.s. Using overflow: hidden; hides the box-shadow so...