Preserving aspect ratio, the pure CSS way...
At least there wasn't. Until now. I came up with a solution involving giant transparent images. The GIF files are only 2KB large, so it has no impact on the loading times.
The <IMG> tag has always been a bit special: web browsers try to maintain pictures aspect ratio. And since a container will adapt to its content's size, a <IMG> in a <DIV> should provide a way to enforce a fixed ratio between the dimensions of the latter! That was the general idea, and I implemented it in the two following pages: