title: Evenly space a gallery of images
body: <p>I have a gallery of images, each of which have the same width and height, say 10px. I want them spaced so that there are 5 on a row and they are each 5px apart, on all sides. The container div has 5px padding. There are multiple rows!</p>
  
  <p>My problem is that if I give each image a left margin of 5px then either:</p>
  
  <p>a) The container div is sized to fit and so only 4 images fit on a row as the fifths margin shunts it onto the next line.</p>
  
  <p>b) The container div is sized with an extra 5px resulting in the an extra gap at the end of each row.</p>
  
  <p>How should I style my images so they all fit on the correct row and without any ugly gaps <strong>without changing the containers padding</strong>?</p>