14, and then you are moving the start position
of the text box. Subsequent lines are not indented because to CSS, it??™s just one long piece of text.
If you want the whole paragraph indented, then you need to set the margin-left property of the paragraph; in other
words, you have to push the whole container to the right. All you need to remember from all this is that text properties
are applied to the long, thin, snake-like inner text box, not the box of the containing element.
STYLIN??™ WITH CSS - CHAPTER 3 86
Text-Indent Property
Example: p {text-indent:3em;}
Values: any length value (positive or negative)
Because I have already touched on it, let??™s start with the text-indent
property. This property sets the start position of the text box in relation
to the containing element. Normally, the left edge of the text
box (the start of the ?¬? rst line, in the case of a multiple-line block)
and the left edge of the container are the same.
If you set a positive value to the text-indent, then the text moves to
the right, creating an indented paragraph (Figure 3.15).
FIGURE 3.15 Set a positive value for
the text-indent property to create
an indented paragraph.
However, if you set a negative value for text-indent, the ?¬? rst line
hangs out to the left of the containing element. Be careful when you
use negative margins to create a negative indent??”in such a case,
the ?¬? rst line of text actually hangs outside of its container, so make
sure that there is a place for the hanging text to go.
Pages:
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129