Dear Lazyweb, what's the done thing here? I have a set of images of various sizes. I know their aspect ratios ahead of time. I want to lay them out horizontally such that they have the same height, and allocate horizontal space to them as needed to preserve their aspect ratios. That part's easy. Here's where it goes wrong: I would also like each of these images to have a uniform border, and also a uniform horizontal margin between each image.

Here's what I have now, from tonight's DNA Lounge front page, and you can see how it screws up:

Here's what it looks like if you turn off padding and border (those residual borders are burned into the images.) Things end up the proper height, but without a margin between them, it doesn't look great.

Previously, previously, previously, previously, previously.