Edit & Run
In this example, the image is taller than the element containing it, and it is floated, so it overflows outside of its container:
Add a clearfix class with overflow: auto; to the containing element, to fix this problem: