title: How to center elements that have float inside one <div>?
body: <p>I need to fix a problem on an existing web page, I need to center elements that have <code>float : left;</code> inside one big <code>&lt;div&gt;</code>. I don't want to remove the floating, and I'm wondering what is the best way to center those elements and make them on two rows. </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>.big {
    width: 150px;
    height: 150px;
    background: gold;
  }
  .a {
    margin: 5px;
    width: 50px;
    height: 20px;
    text-align: center;
    float: left;
    background-color: red;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="big"&gt;
    &lt;div class="a"&gt;1&lt;/div&gt;
    &lt;div class="a"&gt;2&lt;/div&gt;
    &lt;div class="a"&gt;3&lt;/div&gt;
    &lt;div class="a"&gt;4&lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>