Does background-image display on top of background-color?
10th April 2007
Yes, it should.
When setting a background image, authors should also specify a background color that will be used when the image is unavailable. When the image is available, it is rendered on top of the background color. (Thus, the color is visible in the transparent parts of the image). (CSS 2.1)
When setting a background image, one should also set a background color that will be used when the image is unavailable. When the image is available, it is overlaid on top of the background color. (CSS 1)
Single-line use of ‘background’:
- background: #EE45AF url("back.gif") no-repeat fixed right bottom;
Order of elements:
[background-color] | [background-image] | [background-repeat] | [background-attachment] | [background-position]