SO: I've spent a number of hours tackling this design problem but can't seem to find a precise answer. I'm attempting to scale a div to fit a designated height but constrain its aspect ratio. See example: http://jsfiddle.net/ks2jH/121/
Based on my research, the discussion has sort of been had all over the place, including here. Trouble is, the div only resizes & constrains based on the browser's width, and not its height.
The two closest solutions I found work for width: (1) use the :after pseudo-class http://jsfiddle.net/ks2jH/89/, or (2) use a blank/transparent png [http://jsfiddle.net/ks2jH/94/].
The idea, of course, is to achieve the same thing without specifying a width because it auto adjusts based on the height.
Thoughts?