I've got a basic webpage, where the intent is to have boxes containing either one or two images. The boxes proceed left to right, wrapping whenever needed.
The padding between the images and the container boxes should be 5px all around. The padding is correct when a single image is contained in the box, but grows larger when a second image is added to the box. Adding a third image does not increase the padding further -- the only difference is between "one image" and "more than one image".
I don't understand what is causing the additional padding, so I can't figure out how to avoid or counteract it.
Any insights?
Here is the source of my webpage, followed by a screenshot of how it's rendering in both Chromium 25.0.1364.160 and Firefox 20.0, running on Linux Mint.
<html>
<head>
<style>
body { background:#FFDDBB; }
* { margin:0; padding:0; }
.wrapper { margin:5px 0 0 5px; float:left; border:1px solid black; padding:5px; background:white; }
</style>
</head>
<body>
<div class="wrapper">
<img src="http://placehold.it/200x200"/>
</div>
<div class="wrapper">
<img src="http://placehold.it/200x200"/>
<img src="http://placehold.it/200x200"/>
</div>
</body>
</html>