Autarchy of the Private Cave

Science, Society, Programming and Hobbies

  • Exits

  • Categories

  • Archives

  • Visitors' track

    Locations of visitors to this page
  • Tags list

  • Earn and spend


  • Exits

  • Ratings

    Science Blogs - Blog Top Sites website monitoring service
  • 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':

    CSS:
    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 This

    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>

     
    Close
    E-mail It