treehouse : what would you like to learn today?
Web Design Web Development iOS Development

CSS background color disappears when ad image

  • Hi,

    here is a sample of the CSS involved, i've set the background color with CSS & then want to have an image in the top right corner, but when i ad the image the CSS color disappears & i'm left with plain white. Is there something i can do to stop this from happening?

    #page-wrap {
    background-color: #333333;
    width: 100%;
    margin: 0 0 0 0px;
    padding: 15 15 15 15px;
    border-width: 1px;
    border-style: solid;
    border-color: grey;
    background: url(images/air.jpg) no-repeat right top;

    }
  • This is how I would write it:
    #page-wrap {
    background: #333 url(images/air.jpg) no-repeat right top;
    width: 100%;
    margin: 0;
    padding: 15px;
    border: 1px solid grey;
    }

    Do you have a link?
  • Hi,

    i fixed issue thanks, i figured since the CSS is it's own property, i would need to embed the image through html & it worked fine, got flash embeded + video exactly the same way :D
  • In any event, you've overwritten your initial background-color property when you write the subsequent background. By not specifying a color in your background property, you've effectively reset it to transparent.