• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

input type="text" -- changing text color

 
Ranch Hand
Posts: 233
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does anyone know, if there is a way to change the text color (texted loaded and inputed) in a HTML <input type="text"> text box. I'd really appreciate any help.
 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can change the color using a style sheet, but its display will depend on whether the user's browser supports CSS. Here is how you would do using an inline style sheet.
First define the style in the HEAD of your document.


<STYLE>
.t4 {font-family: "courier new"; color: 003300;}
</STYLE>


Then, call the style on your text box:


<INPUT CLASS="t4" TYPE="text" NAME="f" VALUE="Some Value">


Hope this helps.
[This message has been edited by Connie Boyd (edited March 20, 2001).]
 
Richard Boren
Ranch Hand
Posts: 233
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, Connie. I'll give it a try. I'm a little concerned about the browser support issue, but this is a lot better than nothing.
Thanks again.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic