I wrote an XHTML 1.0 Transitional page (validated using the W3C's validator), containing a table
with a textarea
in it:
<table>
<tr>
<td>
<textarea rows="" cols="">
</textarea>
</td>
</tr>
</table>
And, in an external stylesheet, I wrote code for the table
and textarea
:
table {
width: 100%;
height: 100%;
margin: 0px;
padding: 0px;
}
textarea {
width: 100%;
height: 200px;
padding: 20px;
margin: 0px;
}
But, for some reason, the padding of the textarea
affects its width, and causes the textarea
to exceed the width of the page, resulting in unwanted overflow.
Is there some way I can apply padding to the textarea
without it affecting its width?