Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Colors in an input text box 1

Status
Not open for further replies.

daph

Programmer
Jun 9, 2000
65
CA
Hi!

I was just wondering if any of you guys know how to put a specific color in an input text box. Is there an attribut that would make this possible in html? Or is there a way using style sheets or javascript to do it?

Any help would be appreciated
Thank you! :)

daph
 
Use a style sheet.

Do something like
INPUT { background-color: #000000;}

and that should change all your INPUT tags.

If you want to extend it for only a certain ones, append a class name to it.

ex
INPUT.myClass {background-color: #000000}

then all the INPUT tags belonging to class myClass will be affected.

I know this works for MSIE, I don't think it works for NN 4.x

good luck
 
Or you can do it inline:

<input type=&quot;text&quot; name=&quot;T1&quot; size=&quot;20&quot; style=&quot;background-color: #FFFF00&quot;> Mike Barone
FREE CGI/Perl Scripts & JavaScript Generators
Ace PopUp Generator Software - Totally FREE
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top