Prev | Current Page 122 | Next

Charles Wyke-Smith

"Stylin' with CSS: A Designer's Guide 2nd Edition"


FIGURE 3.20 These illustrations
show what the various values can
do, but the most useful application
of text decoration is the control of
underlining on links.
The primary application of text decoration is controlling the underlining
of links. For example, it is usually obvious by their location
and organization that sidebar navigation links are indeed links.
They are much easier to read, and look nicer, without their default
underlining, although you might add the underlining back onto
a link when the user mouses over it to con?¬? rm that it??™s clickable.
Conversely, you really want links within body copy to be underlined.
It??™s a nice touch, and improves readability, if you remove the
underlining of a link when the user mouses over it. Think long and
hard before you add underlining to text that is not a link. Perhaps
if you have a column of numbers, you might underline the last one
before the total, or something like that, but Web users are so used to
underlining as the visual cue for a link that you are setting them up
for frustration and a lot of useless clicking if you underline text that
is not actually a link.
STYLIN??™ FONTS AND TEXT 91
Text-Align Property
Example: p {text-align:right;}
Values: left, right, center, justify
There are only four values for this property: left, center, right, and
justify. The text aligns horizontally with respect to the containing
element, and you must set the property on the containing element;
in other words, if you want an h1 headline centered within a div,
set the text-align of the div, not the h1.


Pages:
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134