• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

setting max picture dimension in html

is there a way to set the max dimension of a picture in html, but in a way that it keeps the picture ratio the same?

it seems if i set max width and height, it will distort the pic and not keep the ratio the same....
 
Why not resize in Irfanview or Photoshop? They will do a better job than the browser, will preserve the aspect ratio, and reduce your bandwidth use / page download time since browser scaling doesn't happen until after the full-size image is downloaded.
 
You could write a function to resize the image dimensions, and set it to run when the document.onresize event occurs. Need to know javascript though.
 
Back
Top