Click to See Complete Forum and Search --> : Fixed Image Sizes


MontyV
04-05-2006, 12:24 PM
Can you set a fixed image size requirement for the whole page or section? Meaning if someone were to upload an image into a certain area that CSS will control the general size of the image. I know that there are going to be different dimensions involved here but I would like to control the general size of it. For example if I wanted the image to be no taller then 250px then the image should stay within those realms but horizontal pixels will adjust accordingly without getting out of the aspect ratio.

Thank you for any help provided.

toicontien
04-05-2006, 01:24 PM
That is best left to a server side script. PHP has a nice library of functions that work with images of many types. You could also create a generic class for a DIV tag that contains said images, and have the CSS styles hide the overflow or make the overflow of the DIV scrollable. That would not resize the image though. If you want to resize the images, then your best bet is using a server side script to process the uploaded images, reduce them in physical size and save them to the server's local file system.