Forum Moderators: not2easy
All of the text is black against a white background except for one input text field. I'd like the text to appear red against a white background, but adding a class to change the text color has no impact.
Is it possible to change the font color for just one of the input text fields? I imagine that there has to be a way to accomplish this with 'textarea', but don't know how to make an exception for one text box.
All of the text is black against a white background except for one input text field. I'd like the text to appear red against a white background, but adding a class to change the text color has no impact.
I'm not sure what you mean; what browser are you using? It works in every newer browser I tested on: Firefox 1.0, Opera 7.5, and IE 6 (it doesn't work in Netscape 4.x though, surprise surprise...)
Try this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>HTML 4.01 Transitional</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
textarea.special {
color:#900;
font-weight:bold;
}
</style>
</head>
<body>
<form>
<textarea class="special">Lorem ipsum dolor sit amet consectetuer.</textarea>
<textarea>Lorem ipsum dolor sit amet consectetuer.</textarea>
</form>
</body>
</html>
-B