www.fgks.org   »   [go: up one dir, main page]

Click to Rate and Give Feedback
Measuring Element Dimension and Location

The following section is designed to help Web authors understand how to access the dimension and location of elements on the page through the Dynamic HTML (DHTML) Object Model.

Understanding Properties That Measure Element Dimension and Location

The diagrams illustrated in this document represent different DHTML Object Model properties for the same page. The sample page contains a div element that is relatively positioned on the page. Since the overflow attribute of the div has been set to scroll and it contains more content than can be displayed within its limited client area, scroll bars are displayed.

diagram of a sample page showing the DHTML Object Model properties that are related to the dimension and location of elements
diagram of a sample page showing the DHTML Object Model properties that are related to the dimension and location of elements
diagram of a sample page showing the DHTML Object Model properties that are related to the dimension and location of elements

Click the Show Me button to see a working example.

This feature requires Microsoft® Internet Explorer 4.0 or later. Click the following icon to install the latest version. Then reload this page to view the sample.
Community Content
 
Add Community Content
Unclear (Confusing Dots)      Dave Sexton   |   Edit   |  

The dots in the example do not necessarily represent the "." operator (used in scripting to access properties).

For example, in scripting there is no content or offset property on the body element. To get body.offset.width you could read the offsetWidth property:

http://msdn2.microsoft.com/en-us/library/ms534304.aspx

Tags What's this?: Add a tag
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker
DCSIMG