title: Proportionally resize image based on parent div size
body: <p>I am using full browser width height jquery blockUI to display selected image from gallery. On the image bellow is scheme of view in blockUI.<br/>
  Basically view in side blockUI has width and height set to 100%.<br/>
  Inside there are two more divs. Right has width set to 80% of the view and it contain image.<br/>
  Image has width and height set to 100% (but this is wrong I know).<br/>
  Images that I display here are images in original sizes uploaded by users. But if monitor is 1024x768 and uploaded image is 600x1900 I don't what to that image goes out of the screen.<br/>
  So how can I fix this to display that image centered and proportional?</p>
  
  <p><img src="https://i.stack.imgur.com/d92Se.png" alt="enter image description here"></p>