the_man_stephen
06-25-2002, 05:05 AM
is there a way to set maximum pixel width of an image in a css style document?
|
Click to See Complete Forum and Search --> : Image size in CSS? the_man_stephen 06-25-2002, 05:05 AM is there a way to set maximum pixel width of an image in a css style document? Grizzly 06-25-2002, 02:26 PM Exactly what behavoir are you trying to accomplish? Are you trying to have an image displayed at actual size and proportions, BUT, if the image is larger than "x" pixels wide, than you would like the image scaled down? There's currently no way to do this with CSS. I've done this in quite a few web site's with Server-side languages such as Cold Fusion and PHP. Basically, you have to write a script to read the image's file headers directly from the file system on the web server to determine what the actual width & height of the image is. You can then do some proportion calculations to resize the image as necessary. SharkyExtreme.com
Copyright Internet.com Inc. All Rights Reserved. |