title: using flexbox to get pinterest or jQuery masonry layout
body: <p>Wanted to know if it is possible to get the same type of design layout as pinterest or jQuery masonry using only the new flexbox layout. Here is as far as I got it:</p>
  
  <pre><code>.flex-container {
      display: -webkit-flex;
      display: flex;
      -webkit-flex-flow: row wrap;
      flex-flow: row wrap;
  }
  .item {
      width: 220px;
      height: 250px;
      margin: 10px auto;
      padding: 0;
      background: #ccc;
  }
  .item:nth-child(3n+2) {
      background: #aaa;
      height: 400px;
  }
  </code></pre>
  
  <p>and the HTML I am just using a PHP loop to create 12 items</p>
  
  <pre><code>&lt;?php
      for ($i=0; $i&lt;=11; $i++) {
          echo '&lt;div class="item"&gt;&lt;/div&gt;';
      }
  ?&gt;
  </code></pre>