All the information gained about the environment so far in this chapter was derived from asking the browser questions, such as its type and screen size. The rest of this chapter deals with information gained by asking objects in the browser window about themselves. Finding an object's dimensions, position, visibility, and 3-D position requires the use of the cross-browser DOM.
All objects have a width and height that determine their dimensions (see "Understanding the Element's Box" in Chapter 7). Knowing the dimensions of an object (Figure 12.17) helps you move and position the object so that it does not go off the screen on the right or bottom, especially when you create scroll bars (see "Creating Your Own Scroll Bars" in Chapter 25).