Wednesday 10th of February 2016 01:40:26 PM

Book Home

Cascading Style Sheets: The Definitive GuideSearch this book

Symbols | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z

Index: Y

There are no index entries for this letter.


Symbols | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z


Library Navigation Links

Copyright © 2002 O'Reilly & Associates, Inc. All Rights Reserved.

tend to appear darker to Macintosh users, whereas images created on aMacintosh look lighter for Windows users.

The situationdegrades even further when colors are printed, since factors asdiverse as the stock and color of the paper used, and even thetemperature of the printing mechanism, can affect how well colors arereproduced on paper.

In effect, this is yet anotherarea where you must remember that total control over documentappearance is simply not possible. In this case, it's due to acombination of inconsistent operating system settings and thevagaries of human perception, which is an obstacle no computer isproblem. In order to make this text stand out more than usual, youmight decide to color it red. All that's needed is a class ofwarn on each paragraph that contains warning text(<P CLASS="warn">) andthe following rule:

P.warn {color: red;}
P.warn {color: red;}P.warn A:link {color: green;}

Then you change your mind, deciding that warning text should be gray

<BODY TEXT="black" LINK="#808080" ALINK="silver" VLINK="#333333">
BODY {color: black;}     /* replacement CSS */
A:link {color: #808080;}
A:active {color: silver;}
A:visited {color: #333333;}
Figure 6-3

Figure 6-3. Replacing BODY attributes with CSS

While this may seem like a lot of extra typing, consider that using the old method of BODY attributes, you could only make changes at the document level. For example, if you wanted someThus, in the following example, the first two IMGelements shown will match the preceding rule, whereas the third willnot, as illustrated by Figure 10-7:

P[class="directions"] {color: red;}P.directions {color: red;}DIV[ID="abc123"] {color: blue;}DIV#abc123 {color: blue;}

Obviously, the latter rule in each pair is much simpler to type andedit, and you'll probably use such rules in most circumstances.

This sets all anchors with the class external(<A CLASS="external"HREF="...">) to be silver, instead of mediumgray. They'll still be a dark gray once they've beenvisited, of course, unless you add a special rule for that as well:

BODY {color: black;}A:link {color: #808080;}      /* medium gray */A.external:link  {color: #666666;}A:active {color: silver;}

effect for Negative values are permitted, and cause "hangingindents."

text-transformIE4 Y/Y IE5 Y/Y NN4 Y/Y Op3 P/-

This property changes the case of theletters in the element, regardless of the case of the original text.The selection of letters to be capitalized by the valuecapitalize is not a precisely defined behavior,depending as it does on "words," which are difficult todefine in a programmatic way.