|
-
Sushi
Image size in CSS?
is there a way to set maximum pixel width of an image in a css style document?
-
Ursus Arctos Moderatis
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|