title: Margin from last div and last column
body: <p>How to take a <code>margin</code> from the last div of each column, and to margin all the divs of the last column</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>* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  div.teste {
    margin: 135px auto 0 auto;
    width: 300px;
    padding: 10px 10px;
    overflow: hidden;
    border: 2px dashed #000
  }
  
  div.teste&gt;h3 {
    margin: 0 0 10px 0;
    border-bottom: 2px dashed #000
  }
  
  div.teste&gt;div {
    float: left;
    padding: 0 5px;
    margin: 0 5px 5px 0;
    width: 65px !important;
    height: 25px;
    text-align: center;
    line-height: 25px;
    background-color: rgba( 0, 0, 0, 0.4);
  }
  
  div.teste&gt;div:nth-child( 4n-1) {
    margin: 0;
    background-color: #ccc
  }
  
  div.teste&gt;div:last-child {
    margin: 0;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="teste"&gt;
    &lt;h3&gt;Primeiro&lt;/h3&gt;
  
    &lt;div&gt;1&lt;/div&gt;
    &lt;div&gt;2&lt;/div&gt;
    &lt;div&gt;3&lt;/div&gt;
    &lt;div&gt;4&lt;/div&gt;
    &lt;div&gt;5&lt;/div&gt;
    &lt;div&gt;6&lt;/div&gt;
    &lt;div&gt;7&lt;/div&gt;
    &lt;div&gt;8&lt;/div&gt;
  
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>the expected result would be this
  <a href="https://i.stack.imgur.com/kp5Yl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kp5Yl.png" alt="example"></a></p>