I’m currently writing a bit on aids again, and I’m currently working on a dynamic resizing function that resizes images to fit in the view-port of the browser. Check for example this image, which should neatly fit the height of your viewport.
To correct for the navbar on top, I need to subtract 120 pixels… Usually, the following bit should do:
var width = (Bheight - 120) * ratio;
However, this piece of code worked:
Bheight = Bheight - 120;
var width = Bheight * ratio;