Curtis Crewe
Curtis Crewe

Reputation: 4336

using web-kit gradient and image in CSS background

I'm attempting to place an image on top of this class as well as keeping the current background added using Web-Kit Gradiant

background: -webkit-gradient(linear, left bottom, left top, 
color-stop(0.03, #3A79C1), color-stop(0.99, #5F9EE6), 
color-stop(1, #75ABEA)) url(images/bg.gif) no-repeat center right;

Although it's adding the background just not the image, is the code right ?

Upvotes: 0

Views: 100

Answers (1)

Black Bird
Black Bird

Reputation: 797

Right idea, however you're missing a comma and also you want your image to show on top of the gradient.. Not below! So re-arrange the order. Check out this jsFiddle

background: url('images/bg.gif') no-repeat center right,-webkit-gradient(linear, left bottom, left top, 
color-stop(0.03, #3A79C1), color-stop(0.99, #5F9EE6), 
color-stop(1, #75ABEA)) ;

Upvotes: 1

Related Questions