TOC PREV NEXT INDEX

domref



offsetWidth


offsetWidth gets the number of pixels that the current element is offset within the offsetParent node.

Syntax

width = element.offsetWidth
 

Parameters

width is an integer representing the offset in pixels.

Example

color_table = document.getElementById("t1");
 
tOffset = color_table.offsetWidth;
 
if ( tOffset > 5 ) {
 
    // large offset: do something here
 
}
 

Notes

None.

Specification

DOM Level 0. Not part of specification.


Netscape Communications
http://developer.netscape.com
TOC PREV NEXT INDEX