Friday 19th of September 2014 11:48:39 AM

Given this reason alone, it's always a good idea to specify abackground color when using a background image, so that your whitetext will at least be visible:

P.starry {background-image: url(http://www.site.web/pix/stars.gif);background-color: black; color: white;}<P CLASS="starry">It's the end of autumn, which means the stars will bebrighter than ever!  Join us...

Besides, if you have the image do something other than fully tileacross the entire background of the document, then you'll need

Book Home

Cascading Style Sheets: The Definitive GuideSearch this book

Symbols | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z

Index: X

x-height: 3.2.2.1. em and ex units
XML (Extensible Markup Language): 1.2.6. Preparing for the Future
display property and: 2.9.1. Why Does the display Property Exist?
selectors in: 2.1.2. Simple Selectors


Symbols | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z


Library Navigation Links

Copyright © 2002 O'Reilly & Associates, Inc. All Rights Reserved.

Inherited

no

Applies to

all elements

containing block are treated as auto.

In addition, even though they don't explicitly say so, the examples in this section (and the next few sections) are all based around absolute positioning. Since absolute positioning is the simplest scheme in which to demonstrate how top, right, bottom, and left work, we'll stick to that for now.