• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 5. Using Core HTML Properties > The offsetHeight, offsetWidth, offsetLe...

The offsetHeight, offsetWidth, offsetLeft, offsetRight, and offsetParent Properties

The offsetHeight, offsetWidth, offsetLeft, and offsetRight properties give the offset, in pixels, of an object from its parent container (for both the object and the parent object, the origin, (0, 0), is at upper left). The offsetParent property holds the parent object that these properties are measured with respect to. You can see the support for this property in Table 5.40.

Table 5.40. The offsetHeight, offsetWidth, offsetLeft, offsetRight, and offsetParent Properties
Property NS2 NS3 NS4 NS6 IE3a IE3b IE4 IE5 IE5.5 IE6
offsetHeight    x   x x x x
  Read-only
  Type: Integer
offsetWidth    x   x x x x
  Read-only
  Type: Integer
offsetLeft    x   x x x x
  Read-only
  Type: Integer
offsetTop    x   x x x x
  Read-only
  Type: Integer
offsetParent    x   x x x x
  Read-only
  Type: Object



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint