Click to See Complete Forum and Search --> : background-image for INPUT?
cyberchimp
05-24-2003, 07:58 AM
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.
Charles
05-24-2003, 08:05 AM
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(http://forums.webdeveloper.com/images/smilies/cool.gif)}
-->
</style>
<form action="">
<div>
<input type="text">
</div>
</form>
cyberchimp
05-24-2003, 09:17 AM
Many thanks, that works a treat.
:¬)