Christopher
Christopher

Reputation: 2103

CSS background image

I have

.green {
background-image:('http://i42.tinypic.com/xzup2.jpg')
background-repeat: no-repeat;
height:430px;
width:100%;
}
.yellow {
background-image: url('/images/yellowlight.png');
background-repeat: no-repeat;
height:430px;
width:100%;
}

in my css.

.yellow works fine, but .green. does not work. What's wrong?

Upvotes: 0

Views: 156

Answers (1)

Jimmy
Jimmy

Reputation: 37101

You're missing the "url" bit.

background-image:('http://i42.tinypic.com/xzup2.jpg')

should be:

background-image: url('http://i42.tinypic.com/xzup2.jpg');

Upvotes: 6

Related Questions