title: How to use position fixed in flex layout?
body: <p>I have a flexbox layout with two columns.</p>
  
  <p>The left column be fixed, while the right is scrollable.</p>
  
  <p>How can you do that?</p>
  
  <p>Take a look at the following code:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>#parent {
    display: flex;
  }
  #left {
    flex-grow: 1;
  }
  #left div {
    position: fixed;
    background: blue;
    top: 0;
    left: 0;
    height: 100vh;
  }
  #right {
    flex-grow: 5;
    background: red;
    height: 300vh;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="parent"&gt;
    &lt;div class="child" id ="left"&gt;
      &lt;div&gt;
        ABC
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="child" id ="right"&gt;
    DEF
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p><a href="https://jsfiddle.net/spfroavm/4/" rel="noreferrer">Fiddle</a></p>