title: Align flex children to top
body: <p>How do I get flexbox children to line up vertically to the top edge of each row?</p>
  
  <p>HTML:</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>#container {
    align-items: flex-start;
    align-content: flex-start;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
  }
  .child {
    margin: auto;
    border: 1px dotted #CCC;
  }
  img, h3 {
    width: 160px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="container"&gt;
    &lt;div class="child"&gt;
      &lt;img src="http://via.placeholder.com/160x160"&gt;
      &lt;h3&gt;Title&lt;/h3&gt;
    &lt;/div&gt;
    &lt;div class="child"&gt;
      &lt;img src="http://via.placeholder.com/160x160"&gt;
      &lt;h3&gt;The quick brown fox jumps over the lazy dog&lt;/h3&gt;
    &lt;/div&gt;
    &lt;div class="child"&gt;
      &lt;img src="http://via.placeholder.com/160x160"&gt;
      &lt;h3&gt;Title&lt;/h3&gt;
    &lt;/div&gt;
    &lt;div class="child"&gt;
      &lt;img src="http://via.placeholder.com/160x160"&gt;
      &lt;h3&gt;Title&lt;/h3&gt;
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Demo: <a href="https://codepen.io/anon/pen/GOBzOp" rel="noreferrer">https://codepen.io/anon/pen/GOBzOp</a></p>
  
  <p>What I see is <a href="https://i.stack.imgur.com/28ImO.png" rel="noreferrer"><img src="https://i.stack.imgur.com/28ImO.png" alt="this"></a> but I want it to look like 
  <a href="https://i.stack.imgur.com/NmHMj.png" rel="noreferrer"><img src="https://i.stack.imgur.com/NmHMj.png" alt="this"></a></p>