Search code examples
htmlcssstylesheet

Apply Gradient background color and image at the same time


Is it possible to apply background-image and background-color to a text field at the same time.

What I was trying to achieve is : Show an icon at the right corner of text field. Also Make that text field a little bit gradient using the style

background: -moz-linear-gradient(center bottom , white, #D6E5F4) repeat scroll 0 0 transparent

Thanks


Solution

  • yes; you can apply color & image at same time .You have to write like this:

    background: url("image.png") no-repeat 0 0,-moz-linear-gradient(center bottom , white, #D6E5F4);
    

    check http://jsfiddle.net/sandeep/7yMhX/