Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-10-2012, 09:09 AM   PM User | #1
prajwala
New Coder

 
Join Date: Feb 2007
Posts: 67
Thanks: 7
Thanked 0 Times in 0 Posts
prajwala is an unknown quantity at this point
Question Image width="auto" not working in IE

I am applying width auto to the images which is not working in IE9.

How can i get the width and height of the image on load so that i can apply width and height to the images dynamically.
prajwala is offline   Reply With Quote
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,452
Thanks: 0
Thanked 498 Times in 490 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
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:30 PM.


Advertisement
Log in to turn off these ads.