Have Image take up as much of window as possible, without exceeding borders

winux4u

New Member
Now the title of the question may have been worded the wrong way.I want the image to take up 100% of the width or heigh (I guess whichever is larger). Kind of like when you have a photoviewer and there make be a black border on the sides or the top, depending which way it is.Obviously if it's a very small image I don't want it to stretch, I never want any of the images to stretch, I just want them to fill as much of the window out as they can.For example, when you load an image on Google, it doesn't show it's fullest resolution. It shrinks it down to fit within the borders of the page if it is to big. Then you can click on it to zoom in if you want.How would I accomplish this? Thanks.
 
Back
Top