Web Design

(Nancy Kaufman) #1

117


CHAPTER

Formatting Your Pages 4


Can I make my first line indentation increase or
decrease automatically if I change my font size?
Yes. Set the text-indent in ems to have it scale
with the font. For example, if you are using 14-pixel
text, you could set text-indent: 1.5 ems to
have a 21-pixel indentation. If you later changed the
text to 10 pixels, the indentation would automatically
adjust to 15 pixels — one and a half times the font.

Can I indent the whole paragraph, instead of just
the first line?
Yes. The margin and padding properties in CSS allow
you to control the spacing around elements on the
page. Both of those properties are discussed later in
this chapter.

● When viewed in a browser,
the first line of each
paragraph is indented and
aligned according to the
values you set.

3 Within an existing p
declaration, type text-
align: ?;, replacing?
with right, left,
center, or justify.


3


TIPS

Free download pdf