You might have noticed the property-value pair display: block in the rules in ch09_02.css: TITLE {display: block; font-size: 24pt; font-weight: bold; text-align: center; text-decoration: underline} AUTHOR {display: block; font-size: 18pt; font-weight: bold; text-align: center} SECTION {display: block; font-size: 16pt; font-weight: bold; text-align: center; font-style: italic} P {display: block; margin-top: 10} In particular, display: block specifies that the element in question get its own block, which means that these elements start on a new line and that the element following them starts on a new line as well. That is, you use display: block to create block-level elements. The display property is more important in XML stylesheets than it is in HTML stylesheets because HTML styles such as <H1> already inherit the display: block style. To create elements that you want set off from other elements, such as paragraphs and headers, use display: block . (For example, using this style specification is the reason the <TITLE> , <AUTHOR> , and <SECTION> elements appear on their own lines in Figure 9-2.)
|