Wednesday 28th of June 2017 07:19:10 AM

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
Library Navigation Links The odds arethat you're already, to a certain extent, familiar with theconcept of vertical alignment of text. If you've ever used theelements SUP and SUB (thesuperscript andsubscript elements) or used an imagewith markup along the lines of <IMGSRC="foo.gif"ALIGN="texttop">, then you've done somerudimentary vertical alignment. The CSS property

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

STRONG {font-weight: lighter;} /* lighter than its parent */ B {font-weight: lighter;} /*lighter still */ <P> 900 <SPAN> 700 <STRONG> 400 <B> 300 <STRONG> 200 </STRONG></B></STRONG></SPAN>. </P> <!-- ...or, to put it another way... --> <P> bold <SPAN> bold <STRONG> regular <B> regular <STRONG> regular </STRONG></B></STRONG></SPAN>. Next, we'll find out about that default, and muchmore.

7.4.2. Border Widths

Onceyou've assigned a style, the next step in customizing a borderis to give it some width. This is done with the propertyborder-width. You can also use one of the cousinline of reasoning explains how the left inner edge of the floated element can be placed to the left of the left inner edge of its parent.

Many of you may have an overwhelming desire to cry "Foul!" right about now. Personally, I don't blame you. It seems completely wrong to allow the top inner edge to be higher than the top outer edge, for example, but with a negative top margin, that's exactly what you get -- just as negative margins on normal, nonfloated elements can make them wider than theirthese guns will pretty much void your monitor's warranty.) These guns shoot out beams of light in varying levels of light and dark, in one of the three RGB colors, at each point on the screen. The brightnesses of each of these beams combine at each point to form all of the colors you see on your screen. Each point, by the way, is known as a pixel, which is a term to which we'll return later in the chapter.

Given the way colors are created on a monitor, it makes sense that a good way to let you set colors is to give you direct access to those

5.4.1. Fonts with Style

font-style is very simple: it's used toselect between normal text,italic text, and oblique text.That's it! The only complications are in recognizing thedifference between italic and oblique text and knowing why browsersdon't always give you a choice anyway.