background-image for INPUT?

liunx

Guest
Is it possible to use a background-image for an INPUT field of a form? I've been trying with the format:

input {
background-image: url(../images/background.jpg)
}

...but with no luck.
Anyone?
Thanks.The following works for me and on several graphical browsers.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Content-Script-Type" content="text/javascript">
<title>Example</title>
<style type="text/css">
<!--
input {background-image:url(<!-- m --><a class="postlink" href="http://forums.webdeveloper.com/images/smilies/cool.gif">http://forums.webdeveloper.com/images/smilies/cool.gif</a><!-- m -->)}
-->
</style>
<form action="">
<div>
<input type="text">
</div>
</form>Many thanks, that works a treat.
:?
 
Back
Top