Prev | Current Page 203 | Next

Tommy Olsson and Paul O'Brien

"The Ultimate CSS Reference"


For example, the h1 element is a descendant node of the html element, and the html
element is an ancestor node of the h1 element. Nodes that have the same parent are
called siblings. The h1 and p elements are sibling nodes.
When the DOM tree has been constructed, and any CSS style sheets have been
loaded and parsed, the browser starts the rendering phase. Each node in the DOM
tree will be rendered as zero or more boxes.
Just as there are block-level elements and inline elements in HTML, there are block
boxes and inline boxes in CSS. In fact, there are several other box types, but they
can be seen as subtypes of the block and inline boxes.
A CSS box is always rectangular.2 It has four sides with a 90?° angle between each
of them.
From a somewhat simplified perspective, we can say that it??™s the user agent style
sheet (p. 118) which specifies that block-level HTML elements generate block boxes,
while inline-level HTML elements generate inline boxes. We can, of course, use the
display property to change the type of the box generated for any element.


Pages:
191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215