Textarea width issue in div
<p>I just want to put a <code>textarea</code> into a <code>div</code>, I think it should not be a problem:</p>

<p><strong>CODE</strong></p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true">
<div class="snippet-code">
<pre class="snippet-code-css lang-css prettyprint-override"><code>.panel {
  width: 250px;
  padding: 10px;
  box-sizing: border-box;
  border: 1px solid #000;
}
.panel textarea {
  width: 100%;
}</code></pre>
<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="panel"&gt;
  &lt;textarea&gt;&lt;/textarea&gt;
&lt;/div&gt;</code></pre>
</div>
</div>
</p>

<p>This is a very difficult code, isn't it?  All of us did it thousand of times.</p>

<p>For some reason, this width of the <code>textarea</code> is buggy at right side. Checking the box model of <code>.panel</code> seems good.</p>

<p>Tried it in FF, Chrome, Edge, same result everywhere.</p>

<p>Can somebody explain me, why is it, and what is the solution for it?</p>

<p>I've made a <a href="https://jsfiddle.net/betq6eo3/" rel="nofollow">jsFiddle</a> just for fun.</p>