• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

input type="text" -- changing text color

 
Ranch Hand
Posts: 233
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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.
 
You had your fun. Now it's time to go to jail. Thanks for your help tiny ad.
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic