title: using a flex item as a flex container
body: <p>I wanted to use flexbox with a column layout, but I wanted the top <code>n - 1</code> flex items to be pinned to the top and the <code>nth</code> flex item to be pinned to the bottom of the main flex container area.</p>
  
  <p>I solved this by using the <code>nth</code> flex item to also be a new flexbox/flex container using <code>justify-content: flex-end</code>, but I couldn't find any examples that were doing this - so is this a correct/acceptable solution according to the standard and, if not, how would I otherwise go about this with flexbox?</p>
  
  <p>Here's a quick example:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.flex-container {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    width: 300px;
    height: 240px;
    background-color: Silver;
  }
  .flex-container-bottom {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    width: 300px;
    height: 240px;
    background-color: orange;
    -webkit-justify-content: flex-end;
    -ms-flex-pack: end;
    justify-content: flex-end;
  }
  .flex-item {
    background-color: DeepSkyBlue;
    width: 100px;
    height: 100px;
    margin: 5px;
  }
  .flex-item-bottom {
    background-color: red;
    width: 100%;
    height: 50px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="flex-container"&gt;
    &lt;div class="flex-item"&gt;flex item 1&lt;/div&gt;
    &lt;div class="flex-item flex-container-bottom"&gt;
      &lt;div class="flex-item-bottom"&gt;flex item 2&lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>