Javascript Reference
Categories: STYLE

javascript STYLE pixelHeight, pixelWidth

@March 15, 2008, 1:22 a.m.
pixelHeight, pixelWidthFirefox/Netscape/NN n/a IE 4 Chrome/Safari/DOM n/a  

Read/Write  

Specify the height and width of the element in pixels. Use these properties for calculation instead of properties such as height and width, which return strings including units. Changes to these properties may not be visible unless the element has its position style attribute set. Available as a property of the IE style and runtimeStyle objects only.

 
Example
 
var midWidth = document.getElementById("myDIV").style.pixelWidth/2;
 
Value

Integer

 
Default

None.


Powered by Linode.