Forum Moderators: not2easy

Message Too Old, No Replies

Changing the appearance of disabled textareas

         

thomjjames

4:44 pm on Dec 20, 2004 (gmt 0)

10+ Year Member



Hi, does anyone know how to change the appearance of disabled textareas, i'm sure you must be able to do it with CSS, but i'm yet to find the answer on the net.

I've tried the following CSS with no successful!
textarea:disabled {
background-color: #000000;
}

Thanks
Thom

birdbrain

10:32 pm on Dec 20, 2004 (gmt 0)



Hi there thomjjames,

and a warm welcome to these forums ;)

Try it like this...

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>disabled black textarea</title>

<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />

<style type="text/css">
/*<![CDATA[*/

#txt {
background:#000;
width:324px;
height:120px;
font-family:arial;
font-size:24px;
}

/*//]]>*/
</style>

</head>
<body>

<form action="#">
<div>
<textarea id="txt" disabled="disabled" rows="" cols="">
this textarea is not in use but has a black background instead of the default grey.
</textarea>
</div>
</form>

</body>
</html>

birdbrain

thomjjames

1:37 pm on Dec 21, 2004 (gmt 0)

10+ Year Member



Hey birdbrain, thanks for the welcome and the help, you managed to push me in the right direction, thanks
Thom