untitled

(John Hannent) #1
The effects in Figure 7-14 are created by these styles:

<style>

p.right {font-size: 24px; text-align: right;}
p.center {font-size: 24px; text-align: center;}
p.justified {font-size: 24px; text-align: justify;}

</style>

As you see in Figure 7-14, CSS justification isn’t too attractive. The spaces
between the words are simply too wide. This is somewhat improved when
the text lines are wider (the browser window is quite narrow in Figure 7-14).
Nonetheless, the true justification that you see in books and magazines is
quite a bit more subtle and pleasing. True justification involves adjusting the
spacing between letters, not just between words, as IE does it. Also, CSS
offers no hyphenation specification — and hyphenation allows word breaks
that make the lines of text look better as well.

Indenting Text ..............................................................................................


Similar to horizontal alignment, indentationis frequently used to help readers
quickly identify the start of each paragraph, and thus more easily scan text.
On a word processor, indentation is typically what happens when you press
the Tab key.

Figure 7-14:
These three
paragraphs
illustrate
right, center,
and justified
alignments.

142 Part II: Looking Good with CSS

Free download pdf