Javascript Reference
Categories: IMG

javascript IMG height, width

@March 15, 2008, 1:22 a.m.
height, widthFirefox/Netscape/NN 3 IE 4 Chrome/Safari/DOM 1  

Read/Write (IE and Netscape 6)  

Provide the height and width in pixels of the image rendered in the img element. Changes to these values are immediately reflected in reflowed content on the page in Internet Explorer 4 (or later) and Netscape 6. Be aware that images scale to fit the new dimension.

 
Example
 
document.prettyPicture.height = 250;
 
Value

Integer.

 
Default

None.


Powered by Linode.