0

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?

3
Contributors
2
Replies
21
Views
3 Years
Discussion Span
Last Post by shophiarajan47
4

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;

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.