1. This website uses cookies. By continuing to use this website you are giving consent to cookies being used.
    For information on cookies and how you can disable them visit our Cookie Usage page.
    Dismiss Notice

CSS background-image transparency

Discussion in 'Web Development' started by nguyen_corinne, Jun 10, 2009.

  1. nguyen_corinne

    nguyen_corinne New Member

    Hey Im having some trouble with some background-images backgrounds not being transparent when used as background-image in css! The images have been formatted okay and theyre backgrounds are transparent when the images aren't used as background-images. Is there a work around to get the images to display as intended as background-images?
    Thanks in advance
     
  2. southhollister

    southhollister New Member

    Use the body function instead. This will specify color, image, image repeat, position and attachment. Make sure your image is in the same directory as your .css file
    body {
    background: black url("example.jpg") no-repeat fixed 50% 50%;
    }

    Color Values
    [background-color] | [background-image] | [background-repeat] | [background-attachment] | [background-position]