Here's a simple webpage. Why doesn't the textarea's width change when the browser is resized?
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
function resize() {
document.getElementById("main").style.width=window.innerWidth;
}
window.onresize = resize;
window.onload = resize;
</script>
</head>
<body style="margin:0; padding:0;">
<textarea id="main" style="margin:0; padding:0; border:0;" >It was a dark and stormy night, and the rain came pouring down... </textarea>
</body>
</html>