background-color
background-color: { color | transparent | inherit } ;
This property sets the
background-color of an element; it??™s
good practice to specify a foreground
color (color) at the same time, to ensure
that conflicts don??™t arise with colors or
backgrounds that are defined elsewhere.
The background of an element is the
area covered by the width and height
of that element (whether those
Example
This style rule assigns a white background
(#fff) to the element with ID "example" :
#example{
background-color: #fff;
}
SPEC
version initial inherited
CSS1 transparent NO
BROWSER SUPPORT
Op9.2+ Saf1.3+ FF1+ IE5.5+
FULL FULL FULL BUGGY
Color and Backgrounds
The Ultimate CSS Reference 300
dimensions are set explicitly, or the content dictates them); it also includes the area
covered by padding and borders. A background-color (or background-image) that??™s
applied to an element will appear beneath the foreground content of that element,
and the area covered by the padding and border properties for the element.
Pages:
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446