Book HomeCascading Style Sheets: The Definitive GuideSearch this book Sunday 26th of October 2014 08:37:56 AM

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, or for damages resulting from the use of the information contained herein.

Library Navigation Links

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

element by using negative margins? For example, an image could befloated so far up that it intrudes into a paragraph that has alreadybeen displayed by the user agent.

In this case, it's up to the user agent, but the CSSspecifications explicitly state that user agents are not required toreflow previous content to accommodate things that happen later inthe document. In other words, if an image is floated up into aprevious paragraph, it may simply overwrite whatever was alreadythere. On the other hand, the user agent may handle the situation by Furthermore, it only affects those lines in which a hyperlinkappears. However, there is yet another alternative. Scaling the line heights

There's an even better way to setline-height, as it turns out, and that's touse a raw number as the value of line-height. Thisis so much better because the number is used as a scaling factor, and

  • XML allows you to easily generate XML documents (that contain your information), since it is so structured.
  • XML parsers allow you to code faster by giving you a parser for your all your XML documents (with and without DTDs).
  • XML documents are easily committed to a persistence layer

    XML documents may be stored in files or databases. When stored in files, XML documents are simply plain text files with tags (and possibly DTDs). It is very easy to save your XML documents to a text file and pass the text file around to other machines, platforms and programs (as long as they can understand the data). In the worst case scenario, XML documents (files) can be viewed in a text editor on just about any platform.

    only to itself, it actually arrives at and uses a color. It doesn't do so randomly, exactly, but the effect is practically the same. For example, invalidValue comes out as a dark blue, and inherit, which is a valid value under CSS2 but not CSS1, will come out as a really awful shade of yellow-green. This is not correct behavior, but you'll need to remember it as you write your styles.

    and content -- is moved in the process of positioning the element.In other words, it is possible to set margins, borders, and paddingfor a positioned element. These will be preserved and kept with thepositioned element, and will be contained within the area defined bythe side-offset properties.

    There are two other side-offset property values that should bementioned here. The first, static-position, causesthe user agent to place the given side of a positioned element whereit would have been if the element had not been positioned. For for the visited links, so we write:

    A:link {color: rgb(0%,40%,0%);}
    A:visited {color: rgb(20%,20%,20%);}

    This gives us our dark green and dark gray hyperlinks.

    Now for headings. They're all supposed to be in a sans serif font, but H1s have some special rules. In order to cover all the bases in a compact manner, we declare:

    H1, H2, H3, H4, H5, H6 {font-family: Verdana,sans-serif;}