title: How to prevent a shrinkwrapped container's scrollbar from overlapping its content?
body: <p>I have the following code:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div style="
    border: 1px solid red;
    overflow: auto;
    max-height: 120px;
    display: inline-block;
   "&gt;
    &lt;div style="
    height: 160px;
    border: 1px solid blue;
    white-space: nowrap;
    overflow: hidden;
   "&gt;text here to occupy some width&lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Which results in this:<br>
  <img src="https://i.stack.imgur.com/tqxBo.jpg" alt=""><br>
  The red box shrinkwraps the blue box, as expected, but the scrollbar overlaps the content, and I don't want that.</p>
  
  <p>I need to achieve this:<br>
  <img src="https://i.stack.imgur.com/To9Td.jpg" alt=""></p>
  
  <p>How can this be done?</p>
  
  <p>PS: I need this to work on Google Chrome.</p>