PDA

View Full Version : How to alter textarea background color and text color?


Kyle
10-05-2002, 08:54 PM
How to alter textarea background color and text color?

x_goose_x
10-05-2002, 09:11 PM
<textarea style="width: 200px; height: 400px; color: red; background-color: blue;">

Kyle
10-06-2002, 07:35 AM
Can't have specific RGB values?

x_goose_x
10-06-2002, 04:11 PM
<textarea style="width: 200px; height: 400px; color: #FF0000; background-color: #0000FF;">

whammy
10-06-2002, 05:43 PM
http://www.w3schools.com/css

a MUST read...

duniyadnd
10-07-2002, 02:52 AM
Note: I answered this wrong, what is below is how to change table cells when your mouse goes over it, if you need it, help yourselves, but it doesn't take care of the initial question

------------------

put this as a javascript code within the <head> tags

<script>
<!--
function setPointer(theRow, thePointerColor)
{
if (typeof(theRow.style) == 'undefined' || typeof(theRow.cells) == 'undefined') {
return false;
}

var row_cells_cnt = theRow.cells.length;
for (var c = 0; c < row_cells_cnt; c++) {
theRow.cells[c].bgColor = thePointerColor;
}

return true;
}
-->
</script>

and put this in the table you want to change information (within rows or cells depending on what effect you want):

<tr style="cursor: hand" bgcolor="#ffffff" onMouseOver="setPointer(this, '#adeaae')" onMouseOut="setPointer(this, '#ffffff')" onclick="location.replace('LINK.html');">

Saw this example from phpAdmin, and I didn't feel like making it myself though rather simple, so took it from them, so credit goes to them.

Duniyadnd

joh6nn
10-07-2002, 03:36 AM
call me crazy duniyadnd, but isn't that dynamically changing the color of table cells, and not textareas?

Kyle
10-07-2002, 08:44 AM
Guess again the browser competibility issue comes in, even the login screen or the reply posting screen of this site are with a dark input area for NS but not working for IE5 I am using.

duniyadnd
10-07-2002, 05:11 PM
AAAAAARRRGHHH!!

You're right Joh6nn, learned an important lesson, don't write in forums when you half asleep, made two stupid mistakes yesterday... :rolleyes: One was this, the second was posting in the wrong forum. Oh well... I'll let my response be (with some changes), could answer some people's question when they run across it.

Duniyadnd