title: Generate div columns using jquery
body: <p>following code on jsfiddle:</p>
  
  <pre><code>&lt;div id="container"&gt;
      &lt;div class="b"&gt;test1&lt;/div&gt;
      &lt;div class="b"&gt;test2&lt;/div&gt;
      &lt;div class="b"&gt;test3&lt;/div&gt;
      &lt;div class="b"&gt;test4&lt;/div&gt;
      &lt;div class="b"&gt;test5&lt;/div&gt;
      &lt;div class="b"&gt;test6&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>CSS</strong></p>
  
  <pre><code>.b {
      display:inline-block;
      position: relative;
      margin: 2px;
      float:left;
      width: calc(16.7% - 10px);
      height:400px;
      background-color: white;
      border: 1px solid black;
  }
  </code></pre>
  
  <p><a href="http://jsfiddle.net/329vcLLc/" rel="nofollow">http://jsfiddle.net/329vcLLc/</a> does work, it shows 5 columns the way I would like them to be formatted.</p>
  
  <p>I must loop over an array to generate the divs according to the number of elements of the div. I thought I could use the <code>append()</code> function, what do you think? and how can I set the width property for each div (cause it depends on the number of columns)</p>
  
  <p>any ideas?</p>