title: Full width child elements inside scrollable container
body: <p>I have a div-container with a fix width and some child-elements witch could be bigger than the parent.</p>
  
  <p>Is it possible to let all the child-elements take the full width of the scrollable area from the parent-element (<code>overflow: auto</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-css lang-css prettyprint-override"><code>#container {
      width: 200px;
      background-color: grey;
      overflow:auto;
      margin:10px;
  }
  
  #container p{
      display:block;
      background-color: green;
      white-space: nowrap;
      width: 100%;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="container"&gt;
      &lt;p&gt;Sample Text 1&lt;/p&gt;
      &lt;p&gt;Sample Text 2&lt;/p&gt;
      &lt;p&gt;A very very very very very long Sample Text&lt;/p&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Here is the <a href="https://jsfiddle.net/n6d2cung/" rel="noreferrer">fiddle</a>. When you scroll to the right, you can see that the child-elements background-color is smaller than the content.</p>
  
  <p><a href="https://i.stack.imgur.com/KtrIV.png" rel="noreferrer"><img src="https://i.stack.imgur.com/KtrIV.png" alt="childs are too small"></a></p>