Scale and Centre Image

This simple piece of code will attempt to scale and center an image to 'best fit' it into a DIV of your choosing. Note that it attempts to fill the DIV completely, so you may not get the result you want

However it can be extremely useful if you have a lot of images that are of a similar size and orientation. Try copying and pasting any landscape image URL into the box below, or try a few of these:-

The image as it is

The image scaled and centered to fit a 320 x 225 px DIV

If you want a basic version of this page, you can see it HERE, and download the code HERE
© Shotton IT 2016. All Rights Reserved. | More Information

e :     t : 07933 857 210