By setting the width to 100% and the 10px field, the text field will have 100% width of the container shifted down and to the left by 10px
To get the desired result, you probably need to use a container around the text box with an indent of 10px.
See an example .
- commentA uses a container with padding
- commentB - your original CSS
so something like:
<div class="comment-container"> <textarea class="commentA"></textarea> </div>
and
.comment-container { padding:10px; } .commentA { width:100%; min-height: 200px; }
to get started.
source share