414 Chapter 23 – Cascading Style Sheets
Properties
Web Design in a Nutshell, eMatter Edition
background-color
Values:
color name or RGB value|transparent
Example:
P.warning { background-color: red }
Applies to:
All elements
Inherited:
No
Sets the background color of the element (creating a colored rectangle). The
default is transparent.
background-image
Values:
URL|none
Example:
BODY { background-image: url(stripes.gif) }
Applies to:
All elements
Inherited:
No
Sets a background image for the element. If a background color is also speci-
fied, the image will be overlaid on top of the color.
background-repeat
Values:
repeat|repeat-x|repeat-y|no-repeat
Example:
BODY { background-image: url(oldmap.gif); background-repeat:
no-repeat }
Applies to:
All elements
Inherited:
No
When a background image is specified, this property specifies whether and
how the image is repeated.
repeat
Allows the image to repeat both horizontally and vertically