I have a div which is resizable but now I have the problem that there is a y-scrollbar. The problem is that this scrollbar isn't necessary, because all content is visible.
Image

HTML
<script>$( "#pc_test" ).resizable({handles: \'n, s\'});</script>
<div id="panel_test">
<div class="panelheadbar pgrau">Test</div>
<div id="pc_test" class="panelcontent ui-resizable" style="font-size: 14px;">
Test<br>Test<br>Test<br>Test<br>Test<br>Test<br>Test<br>
</div>
</div>
CSS
.panelheadbar { padding: 5px; font-weight: bold; color: #000; height: auto; }
.pgrau { background-color: #ccc; }
.panelcontent { overflow-y: auto; overflow-x: hidden;padding: 10px; background-color: #FFF; border: 1px solid #ccc; }
How can I fix this, that there is only a scrollbar when it's needed?
Edit: I want a scrollbar if the user resized it too much.
Edit 2: here there should be a scrollbar

Edit3: The result should look like this
