Prev | Current Page 232 | Next

Craig Grannell

"The Essential Guide to CSS and HTML Web Design"

Therefore, if you set font-weight to bold via a:link alone, visited
links will not appear bold (although the hover and active states will for unvisited
links??”upon the links being visited, they will become hover and active states for visited
links and will be displayed accordingly).
Editing link styles using CSS
Along with changing link colors, CSS enables you to style links just like any other piece of
text. You can define specific fonts; edit padding, margins, and borders; change the font
A simple way of remembering the basic state order (the five states minus focus) is to
think of the words love, hate: link, visited, hover, active. If focus is included and
my order is used, there??™s the slightly awkward (but equally memorable) love her for
always/love him for always: link, visited, hover, focus, active.
USING LINKS AND CREATING NAVIGATION
157
5
weight and style; and also amend the standard link underline, removing it entirely if you
wish (by setting the text-decoration property to none).
a:link {
color: #3366cc;
font-weight: bold;
text-decoration: none;
}
Removing the standard underline is somewhat controversial, even in these enlightened
times, and causes endless (and rather tedious) arguments among web designers. My view
is that it can be OK to do so, but with some caveats.
If you remove the standard underline, ensure your links stand out from the surrounding
copy in some other way. Having your links in the same style and color as other words and
not underlined is a very bad idea.


Pages:
220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244