Autarchy of the Private Cave

Tiny bits of bioinformatics, [web-]programming etc

    • Archives

    • Recent comments

    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’:

    1. background: #EE45AF url("back.gif") no-repeat fixed right bottom;

    Order of elements:
    [background-color] | [background-image] | [background-repeat] | [background-attachment] | [background-position]

    Share

    Leave a Reply

    XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>