Wednesday 23rd of August 2017 07:26:08 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.

won't be able to make any sense of SPAN as apiece of document structure. On the other hand, usingSPAN avoids having to cope with a number of bugsin early CSS implementations, so I've chosen to useSPAN in this case study instead of something alittle more structured.

Having done this, we need a style declaration that will recreate theeffects of all the tags we just deleted. This should just about do

3.1.2.1. Percentage colors

There are, in fact, four ways to affectRGB color. The first way we'll examine is perhaps the easiestto grasp because it uses percentages. Here's an example:

rgb(100%,100%,100%)

This color declaration sets the level of red to its maximum, blue tomaximum, and green the same. These combine to create white, which is, "text" instead of after "boldfaced." This is the only real way in which margins affect line-breaking.

To understand why, let's go back to the paper-and-plastic analogy employed in the previous section. Think of an inline element as a strip of paper with marginal plastic surrounding it. Displaying the inline element on multiple lines is like cutting up the strip into smaller strips. However, no extra plastic is added to each smaller strip. The only plastic used is that which was on the strip to begin with, so it only appears at the beginning and end of thetheir own file. Just remember that no HTML or any other markuplanguage can be included in the style sheet -- only style rules.Here's the markup of an external style sheet:

H1 {color: red;}H2 {color: maroon; background: white;}H3 {color: white; background: black; font: medium Helvetica;}

That's all there is to it -- no STYLEtags, no HTML tags at all, just plain-and-simple style declarations.These are saved into a plain text file and are usually given an