I think I'm doing something wrong here, I expect textarea to be 10 pixels smaller than the parent div on all sides, but itβs not, itβs too small:
<html>
<div style="position: absolute; left: 10px; top: 10px; width:50%; height: 50%; border: 1px solid #000000;">
<textarea style="position: absolute; left: 10px; top: 10px; bottom: 10px; right: 10px; border: 1px solid #FF0000; resize:none;"></textarea>
</div>
</html>
jsfiddle: http://jsfiddle.net/2a7LR/1/
Why is this happening? and how can I make it so that it matches 10 px less on each side of the parent div?
It only displays correctly in chrome / safari, but incorrectly in every other browser (firefox, opera, IE8)
source
share