CSS2 Test Suite: 14.2.1 background-color

[index page] [section] [Previous] [Next] [Specification]

The style declarations contained within this page:

.cl1 {background-color: green;}
.cl2 {background-color: transparent;}
.parent {background-color: silver;}
.inh1 {background-color: red;}


[cl1] This 'p' element should have a green background that completely fills its content-area.

[cl2] This 'p' element should have a transparent background that completely fills its content-area; this will allow the background of any ancestor elements that encompass it to "shine through."

[cl1] This 'p' element contains a 'span' that has been given a class of 'cl2'. The transparent background of [cl2]the inline 'span' should allow the 'p' element's green background to "shine through."


[parent] This 'div' element is the parent of another 'div' that is used to test inheritance. The parent has a silver background.
[inh1] This 'div' element should have the same silver background as its parent, as it has a style attribute set to inherit the background-color value. If the background is red, the 'inherit' test has been failed.
This is the end of the parent element.

[index page] [section] [Previous] [Next] [Specification]