Yes, it should work on <textarea>s too.
Try this.
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<title></title>
<style type="text/css">
label span {
float: left;
}
span.maxAvailWidth {
margin-left: 7em;
display: block;
width:auto;
float: none;
background-color: #f00;
}
span.maxAvailWidth input {
width: 95.9%;
}
</style>
</head>
<body>
<form action="#"><div>
<label><span>label</span>
<span class="maxAvailWidth"><input type="text"></span></label>
</div></form>
</body>
</html>
Bookmarks