I have the following HTML snippet being rendered.
<div style="display: block;" id="rulesformitem" class="formitem">
<label for="rules" id="ruleslabel">Rules:</label>
<textarea cols="2" rows="10" id="rules"/>
</div>
This is my CSS:
textarea
{
border:1px solid #999999;
width:100%;
margin:5px 0;
padding:3px;
}
Is the problem is that the text area ends up being 8px wider (2px for border + 6px for padding) than the parent. Is there a way to continue to use border and padding but constrain the total size of the textarea
to the width of the parent?