Right now, I’m using max-width to scale images to fit. However, they don’t scale proportionally. Is there a way to cause this to happen? I’m open to Javascript/jQuery.
If possible, is there a way to do this without knowing the original dimensions of the image (maybe determine this using Javascript/jQuery)?
You need to specify the original width and height:
And then use something like this in the CSS:
You could try this with jQuery if you don’t have the width and height up front, but your mileage may vary:
Obviously replace
#contentwith whatever selector you want to scope the functionality to.