Book HomeCascading Style Sheets: The Definitive GuideSearch this book Tuesday 21st of April 2015 04:36:34 PM

Copyright © 2000 O'Reilly & Associates, Inc. All rights reserved.

Printed in the United States of America.

Published by O'Reilly & Associates, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.

Nutshell Handbook, the Nutshell Handbook logo, and the O'Reilly logo are registered trademarks of O'Reilly & Associates, Inc. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and O'Reilly & Associates, Inc. was aware of a trademark claim, the designations have been printed in caps or initial caps. The association between the image of a koala and the topic of HTML and XHTML is a trademark of O'Reilly & Associates, Inc.

While every precaution has been taken in the preparation of this book, the publisher assumes no responsibility for errors or omissions,

Table 3-1. Numeric RGB Equivalents for Common Colors

It is also possible, at least in theory, to use fractional values.For example, you might want a color to be exactly 25.5% red, 40%green, and 98.6% blue. Not a problem:

H2 {color: rgb(25.5%,40%,98.6%);}

Actually, there is a problem. Some user agents may not recognizedecimal values, and still others couldinterpret them as if the decimal wasn't there, which would lead or for damages resulting from the use of the information contained herein.

Table of ContentsBook Index0. Preface

Library Navigation Links

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

3.1. Colors

Ofcourse, the one thing that almost every beginning web author wants toknow is, "How do I set colors on my web page?" UnderHTML, there were two choices: use one of a small number of colorswith names, like red or purple,or employ a vaguely cryptic method using hexadecimal codes. Well,both of those methods for describing colors can be found in CSS, aswell as some other methods that are only moderately complex.

used to determine the initial content-height.Thus, if an inline element has a font-size of15px , then the content-height starts out as15px .

Second, all of the inline elements in a given line are alignedaccording to their values for vertical-align. Bydefault, this will cause all text in the line to be aligned alongtheir baselines, but of course differentvertical-align values will have different effects.