View Full Version : Changing background color of text fields

Nov 27th, 2002, 04:42 AM
Is it possible to change the background color of a text field...
<input type="text" name="firstname" value="" size="30">
on a contact form.
Can it be done with Javascript.

The ones in this "post new thread form" are grey, but I think they use styles which I haven't delt with much.

Nov 27th, 2002, 04:53 AM

Its as simple as this:

<input type="text" name="firstname" value="" size="30" style="background-color:blue">

You should get to know CSS :)

Nov 27th, 2002, 05:20 AM
css is your friend, and mine:thumbsup:

Nov 27th, 2002, 05:29 AM
:thumbsup: Thanks cg9com, it looks easier than I thought. I also went here, which has some useful tut's.

CSS Tut (http://www.w3schools.com/css/)

I guess I could change the color by using the #0000FF syntax