B.2. Property Listings

In each table that follows, words under Supported Values that are capitalized are placeholders for either a set of possible values or values drawn from a related property. Examples of placeholders include the following:

LengthNumber followed by a unit of measurement, such as "px" for pixel
PercentageNumber followed by a percent sign
IntegerWhole number

Inherited refers to whether a given property will be drawn from the element's parents if it is not explicitly provided.

The set of elements to which a property applies may well be smaller than the set under which it may be defined. For example, the list styles apply to <li> elements, but are commonly defined at the list level when the XHTML style attribute is used.

NOTE

Support for many of these properties is spotty. Testing on a wide variety of Web browsers is recommended, and there are Web sites that provide extensive information on CSS support across the popular browsers. Among the most comprehensive sites is http://www.blooberry.com.

B.2.1. Background

The properties listed in this section control the color or image displayed behind an element.

B.2.1.1. background-image

Place an image behind an element (typically the body of a document).

table { background-image: url("/images/draft.gif"); }
Supported values:url(), none, inherit
Default value:none
Inherited:No
Applies to:All
B.2.1.2. background-repeat

Define the background image behavior if it fails to fill its element.

table { background-repeat: none; } ...

Get Web Standards Programmer's Reference: HTML, CSS, JavaScript®, Perl, Python®, and PHP now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.