View Full Version : What's wrong with this code?


Rinoa Heartilly
04-03-2004, 10:41 AM
I used the following code on my site withina table, but still, the text remains black. how can i change this so that the text is white on a black background?

<textarea ROWS=15 COLS=100
style="background:black
style="font-family:tahoma"
style="color:white"
style="border style:solid">
text goes here </textarea>

Can anyone help me? I'd greatly appreciate it.

XxJenny
04-03-2004, 01:02 PM
Maybe use hex codes? or use a

TEXTAREA {
FONT-FAMILY: TAHOMA;
COLOR: #FFFFFF;
BACKGROUND: #000000;
border-style: solid;
}

And use -

<textarea>texthere</textarea>

I have a working example here (http://ukwaters.co.uk/test/textarea_test.html)

bourdelson
04-03-2004, 01:04 PM
All style attributes should be under one style thing, and end with a ;

<textarea ROWS=15 COLS=100 style="background-color:#000000; font-face:tahoma; color:#ffffff; border: 1px solid #ffffff;">
text goes here </textarea>

That should work for you. :)

Edit: Jenny, your post wasn't up when I replied. Sorry. :)

XxJenny
04-03-2004, 01:12 PM
All style attributes should be under one style thing, and end with a ;

<textarea ROWS=15 COLS=100 style="background-color:#000000; font-face:tahoma; color:#ffffff; border: 1px solid #ffffff;">
text goes here </textarea>

That should work for you. :)

Edit: Jenny, your post wasn't up when I replied. Sorry. :)
Ai.. doesn't matter :P I think your code could be easier though because it'll be easier to customize for different textarea's :P

pb&j
04-03-2004, 03:20 PM
from the original post question, it is missing a quote after the background color part and missing a dash in the borderstyle part.

<textarea ROWS=15 COLS=100
style="background-color:black;"
style="font-family:tahoma;"
style="color:white;"
style="border-style:solid;">
text goes here </textarea>

i agree that is should all be put into one STYLE value though.

Rinoa Heartilly
04-03-2004, 05:46 PM
Thanks you guys! The code works now. I couldn't have made it without you!