title: Flexbox Header Match Other Rows Content
body: <p>I'm just beginning to figure out Flex box, is there any way to get the header row in a flex box to match the automatic width set by the next X-many rows? I need all the element in the row to be grouped together so I can't use columns.</p>
  
  <p>Perhaps a column with rows inside?</p>
  
  <p>Looking for something similar to a table-column element but for flexbox.</p>
  
  <p><a href="https://jsfiddle.net/benneb10/yjdabpzm/" rel="nofollow">https://jsfiddle.net/benneb10/yjdabpzm/</a></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>html,
  body {
    height: 100%;
    margin: 0;
    font-size: 10px;
    text-transform: uppercase;
    font-family: helvetica;
    text-align: left;
  }
  .flexRowHeader {
    font-weight: bold;
  }
  .flexBox {
    background: lightblue;
    width: 100%;
  }
  .flexBox .flexRow:nth-child(2n) {
    background: #fff;
  }
  .flexRow {
    display: flex;
    justify-content: space-between;
    width: 100%;
    height: 50px;
    align-items: center;
  }
  .multiLineFlexGroup {
    width: 50%;
    align-self: flex-start;
    height: 50px;
    overflow: hidden;
    transition: all 2s ease;
  }
  .multiLineFlexGroup .flexRow {
    align-items: center;
  }
  .flexItem {
    flex: auto;
    max-width: 200px;
  }
  button.icon {
    height: 16px;
    width: 16px;
    background-size: contain;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="flexBox"&gt;
    &lt;div class="flexRow flexRowHeader"&gt;
      &lt;span class="flexItem"&gt;Heading A&lt;/span&gt;
      &lt;span class="flexItem"&gt;Heading B&lt;/span&gt;
      &lt;span class="flexItem"&gt;Heading C&lt;/span&gt;
      &lt;span class="flexItem"&gt;Heading D&lt;/span&gt;
      &lt;span class="flexItem"&gt;Heading E&lt;/span&gt;
      &lt;span class="flexItem"&gt;Heading F&lt;/span&gt;
      &lt;span class="flexItem"&gt;Heading G&lt;/span&gt;
      &lt;span class="flexItem"&gt;Heading H&lt;/span&gt;
    &lt;/div&gt;
    &lt;div class="flexRow"&gt;
      &lt;div class="flexItem"&gt;Test&lt;/div&gt;
      &lt;span class="flexItem"&gt;SMALL ITEM&lt;/span&gt;
      &lt;span class="flexItem"&gt;ANOTHER ITEM&lt;/span&gt;
      &lt;span class="flexItem"&gt;VERY VERY VERY LARGE ITEM&lt;/span&gt;
      &lt;div class="multiLineFlexGroup"&gt;
        &lt;div class="flexRow"&gt;
          &lt;span class="flexItem"&gt;ITEM&lt;/span&gt;
          &lt;span class="flexItem"&gt;ITEM&lt;/span&gt;
          &lt;span class="flexItem"&gt;ITEM&lt;/span&gt;
          &lt;span class="flexItem"&gt;ITEM&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>