Thursday 28th of July 2016 11:04:52 PM

by Eric A. Meyer
ISBN 1-56592-622-6
First edition, published May 2000.
(See the catalog page for this book.)

Search the text of Cascading Style Sheets: The Definitive Guide.

Table of Contents

Copyright Page
Chapter 1: HTML and CSS
Chapter 2: Selectors and Structure
Chapter 3: Units and Values
Chapter 4: Text Properties
Chapter 5: Fonts
Chapter 6: Colors and Backgrounds
Chapter 7: Boxes and Borders
Chapter 8: Visual Formatting
Chapter 9: Positioning
Chapter 10: CSS2: A Look Ahead
Chapter 11: CSS in Action
Appendix A: CSS Resources
Appendix B: HTML 2.0 Style Sheet
Appendix C: CSS1 Properties
Appendix D: CSS Support Chart

<LINK REL="stylesheet" TYPE="text/css"
HREF="sheet1.css" TITLE="Default">
<LINK REL="alternate stylesheet" TYPE="text/css"
HREF="bigtext.css" TITLE="Big Text">
<LINK REL=" alternate stylesheet " TYPE="text/css"
HREF="spoken.css" TITLE="Spoken Word">

Users could then pick the style they wanted to use, and the browser would switch from the first Library Navigation Links

Copyright © 2002 O'Reilly & Associates. All rights reserved.

is its parent's inner right edge, as shown in Figure 8-30. (In this and subsequent figures, the circlednumbers show the position where the markup element actually appearsin relation to the source, and the numbered box shows the positionand size of the floated visible element.)

Figure 8-30

Figure 8-30. Floating to the left (1) or right (2)

2. The left (or right) outer edge of a floated element mustbe to the right (or left) of the right (left) outer edge of aleft-floating (or right-floating) element that occurs earlier in thedocument's source, unless the top of the latter element is

What happens if no such face exists? There are two options provided in the specification. The first is for the user agent to create a small-caps face by scaling uppercase letters on its own. The second is simply to make all letters uppercase and the same size, exactly as if the declaration text-transform: uppercase; had been used instead, as shown in Figure 5-30. This is obviously not an ideal solution, but it is permitted.

H1 {font-variant: small-caps;}
as with the paragraph in the previous example. On the other hand, if you supply four color values, you can get a different color on each side. Any type of color value can be used, from named colors to hexadecimal and RGB values.

P {border-style: solid; border-width: thick;
border-color: black rgb(25%,25%,25%) #808080 silver;}

Figure 7-43 shows us varying shades of gray for borders. Thanks to the grayscale nature of this book, I've been sticking mostly to shades of gray, but any color could be used. If only to your hyperlinks, you would need to use this rule:

A:link:hover {background: blue; color: white;}

The ability to combine pseudo-classes is a new feature of CSS2.


InternetExplorer 4.x and 5.x bothrecognize :hover on anchors only. As of thiswriting, no other browser will recognize :hoverunder any circumstances. parent's inner left and right edges, and that's when thefloated element is wider than its parent. In that case, the floatedelement will simply overrun the right or left inneredge -- depending on which way the element is floated -- in itsbest attempt to display itself correctly. This will lead to a resultlikethatshown in Figure 8-44.