by Eric A. Meyer
First edition, published May 2000.
(See the catalog page for this book.)
Search the text of Cascading Style Sheets: The Definitive Guide.
Chapter 3: Units and Values<LINK REL="stylesheet" TYPE="text/css" HREF="basic.css"><LINK REL="stylesheet" TYPE="text/css" HREF="splash.css">
Copyright © 2002 O'Reilly & Associates. All rights reserved.HTML, the root element is the HTML element, although some browsers may incorrectly use BODY.
For nonroot elements that are not absolutely positioned, the containing block for an element is set as the content edge of the nearest block-level ancestor. This is true even in relative positioning, although it might not seem so at first.
This translates as, "any paragraph that is a first child, andis a child of a DIV, should be in italics."If we were to leave out the child selector as follows, though:
then the rule would read, "any paragraph that is a first childof any element, and is also a descendant of a DIV,should be in italics." The difference is subtle, but real.