I just want to put a textarea into a div, I think it should not be a problem:
CODE
.panel {
width: 250px;
padding: 10px;
box-sizing: border-box;
border: 1px solid #000;
}
.panel textarea {
width: 100%;
}
<div class="panel">
<textarea></textarea>
</div>
This is a very difficult code, isn't it? All of us did it thousand of times.
For some reason, this width of the textarea is buggy at right side. Checking the box model of .panel seems good.
Tried it in FF, Chrome, Edge, same result everywhere.
Can somebody explain me, why is it, and what is the solution for it?
I've made a jsFiddle just for fun.
overflow:hidden;to panel.10pxpadding of div.box-sizing: border-box;to your text area.