Book HomeCascading Style Sheets: The Definitive GuideSearch this book Monday 24th of November 2014 09:54:11 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, BODY {background: fixed url(yinyang.gif) white top left repeat-y;} BODY {background: url(yinyang.gif) white repeat-y fixed top left;}

Figure 6-58

Figure 6-58. Using shorthand

Actually, there is one slight restriction to how the values are ordered in background , which is that if you have two values for background-position , they must appear together, horizontal first, then vertical. That probably isn't a surprise, but it is important to remember.

As is the case for shorthand properties, if you leave out any values, or for damages resulting from the use of the information contained herein.



Library Navigation Links

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

WARNING

Opera 3.5 allows negative padding values, but this was fixed in Opera 3.6. The other browsers don't allow negative padding lengths.

7.5.1. Percentage Values and Padding

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

.sidebar .head {font-size: larger; font-weight: bold;text-decoration: underline; color: white;}

By using the contextual selector .sidebar.head, we ensure only those

10.2.1.3. Adjacent-sibling selector

If you thought that was interesting,consider our next subject: the adjacent siblingselector. This is in some ways like the child selector,but in this case, styles are applied to elements that share a parentand are next to each other in the document tree. For example:

H2 + P {color: silver;}

In the first set of markup, a paragraph immediately follows anH2, so it is silver. In the second, the element