View Single Post
Old 12-10-2012, 06:13 PM   PM User | #2
felgall
Master Coder

 
felgall's Avatar
 
Join Date: Sep 2005
Location: Sydney, Australia
Posts: 5,448
Thanks: 0
Thanked 496 Times in 488 Posts
felgall is a jewel in the roughfelgall is a jewel in the roughfelgall is a jewel in the rough
You shouldn't be trying to size images dynamically - they already have a width and height intrinsic to the image and if you want to resize them from that you should use a graphics program to do so. Browsers are not designed to resize images and will make a mess of the image if you try to display it at anything other than its actual size.

So if you want to automatically resize images then use server side processing that calls a proper graphics routine to do it.
__________________
Stephen
Learn Modern JavaScript - http://javascriptexample.net/
Helping others to solve their computer problem at http://www.felgall.com/
felgall is offline   Reply With Quote