Textbox colour

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
S_henry
Forum Contributor
Posts: 148
Joined: Sun Jan 25, 2004 10:25 pm
Location: M'sia

Textbox colour

Post by S_henry »

Can we assign the colour for textbox? Actually I want to make the same colour for the textbox and the form screen. For example, if my form screen colour is red, I want the textbox colour also red.
TheBentinel.com
Forum Contributor
Posts: 282
Joined: Wed Mar 10, 2004 1:52 pm
Location: Columbus, Ohio

Re: Textbox colour

Post by TheBentinel.com »

S_henry wrote:Can we assign the colour for textbox? Actually I want to make the same colour for the textbox and the form screen. For example, if my form screen colour is red, I want the textbox colour also red.
Have you tried using a style with it? Something like:

<textarea rows=5 cols=20 style="color: red"></textarea>

Maybe back-color or background-color? Try looking up a CSS reference for the right name, but there's almost surely something out there for it.
User avatar
johnperkins21
Forum Contributor
Posts: 140
Joined: Mon Oct 27, 2003 4:57 pm

Post by johnperkins21 »

<textarea rows=5 cols=20 style="background-color:#ffffff"></textarea>
User avatar
vigge89
Forum Regular
Posts: 875
Joined: Wed Jul 30, 2003 3:29 am
Location: Sweden

Post by vigge89 »

You can assign lots of CSS to it, here's an exmaple from my site:

Code: Select all

input, select, textarea &#123;
	background-color: #CDC;
	font-family: Verdana, Tahoma; font-size: 9px; color: #000; font-weight: normal;
	border-style: solid; border-width: 1px; border-color: #000; padding: 1px;
&#125;

Code: Select all

<textarea>text</textarea>
(taken from http://mgs3.starbase.se)
S_henry
Forum Contributor
Posts: 148
Joined: Sun Jan 25, 2004 10:25 pm
Location: M'sia

Post by S_henry »

Great. Problem solved. Thank you guys.. :wink:
Post Reply