These are the properties you use to work with margins, indentations, and alignments:
Here's an example showing how to put some of these properties to work. In this stylesheet, I'm indenting the first line of each paragraph by 40 pixels (for more on the kinds of units you use to specify lengths, see Table 9-1 later in this chapter) and indenting all the text in paragraphs by 20 pixels: Listing ch09_16.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; text-indent: 40px; margin-left: 20px} You can see the results in Figure 9-10. As you see there, the first line of each paragraph is indeed indented, and the paragraph text is also moved to the left. Figure 9-10. Indenting text using a stylesheet.
|