views:

39

answers:

2

I'm trying to find out how to replace the input text with a image. I can't use background: url(.../.../); because I am using CSS3 Gradients. I thought with using multiple backgrounds I am able to add another one that has a transparent image but then the rest of the background gradients disappear.

Can anyone help me?

A: 

Multiple background and gradient... well I suppose you can live dangerously at the edge of browser support. The syntax you're looking for can be found here:

http://snook.ca/archives/html_and_css/multiple-bg-css-gradients

Yi Jiang
Doesn't explain what I want :(
omnix
Oh dear. Okay, lets try to clarify what you want. I inferred from the question that you want a CSS solution to having multiple backgrounds, one of which is a gradient, and the other is a image. So far so good. Now understand that CSS3 is still experimental at this point, so its browser support is kind of low at this point. Is that the problem? Do you need an alternative solution, like the one the other poster suggested? Or is it that the multiple backgrounds do not layer correctly?
Yi Jiang
A: 

You can use two blocks, one inside another and set background for each of them. In result you will have what you need and that will be usable even in IE6 (of course, gradient fill fall back to solid one).

Māris Kiseļovs
Can you explain? I don't understand. I tried using <span> inside the <input></input> but didn't work.
omnix
Well it works, with <img> inside but it doesn't go on the button but inside.
omnix
I mean outside*
omnix