Is there any Javascript library that could force an HTML node (mostly images and div) to keep their aspect ratio while resized?
This would be particularly useful to resize the height of an element when its width is constrained by the size of the window.
Note: if that can be done in pure CSS, I'm buying it!