I have a div that has an image as its background. But the image only covers up about 80% of the screen. I want to make the extra 20% of the screen to be black but its only coming up as white. How can I set the background images and the background color? This is my css,

#first_section_main{
    top:77px;
    min-width:1000px;
    width:100%;
    position:relative;
    height:500px;
    background-color:#3d3d3d;
    background: url(../images/first_section_bg.jpg) no-repeat center center;
}

How can I make the background color #3d3d3d?

The background property is a shortcut to combine all background commands into one, as opposed to having a background-color and a background-image.
So you are setting a background-color and then using the background: to say you don't want a color.
try:
background: #3d3d3d url(../images/first_section_bg.jpg) no-repeat center center;

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.