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

The Containing Block

Normal (static) elements are placed relative to their parent and to elements that precede them, as explained in Chapter 7. Positioned elements are placed relative to so-called containing blocks, which may be their parents, but are usually some ancestor higher up in the document tree.

The containing block for a fixed positioned element is always the viewport (in the case of scrolling media, such as most browsers) or the page box (in the case of paged media). The parent, or even any other positioned elements, has no influence on the position of an element with position: fixed.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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