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

Chapter 12. Learning About Your Environment > Finding an Object's Visible Area

Finding an Object's Visible Area

The width and height of an object tell you the maximum area of the element (see "Finding an Object's Dimensions" earlier in this chapter). When an object is clipped (see "Setting the Visible Area of an Element" in Chapter 9), the maximum area is cut down, and you can view only part of the total visible area. Using JavaScript, you can not only find the width and height of the visible area, but also the top, left, bottom, and right borders of the clipping region (Figure 12.22).

Figure 12.22. An alert appears to tell us the location of the top border of the clip region.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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