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

Absolute Positioning

The simplest form of absolute positioning is when the elements to position are positioned relative to the initial containing block, i.e., the containing block of the root element. When absolutely positioned elements are descendants of other positioned elements, things become more complicated.

There are two major ways in which absolute positioning can be used. One is to have a few small absolutely positioned elements in an otherwise normal document; for example, to put a logo in a corner. The other way is to create “areas” for parts of the document, much like the last example for fixed positioning in the previous section. The difference is that the size of the window isn’t taken into account. Although most browsers will use the width of the window for the width of the initial containing block, the height of the initial containing block is unspecified.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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