title: How to center elements on the last row in CSS Grid?
body: <p>I am using CSS grid to layout some items like this...</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 {
    display: grid;
    grid-template-columns: 16.666% 16.666% 16.666% 16.666% 16.666% 16.666%;
  }
  
  .item {
    background: teal;
    color: white;
    padding: 20px;
    margin: 10px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="container"&gt;
    &lt;div class="item"&gt;Item&lt;/div&gt;
    &lt;div class="item"&gt;Item&lt;/div&gt;
    &lt;div class="item"&gt;Item&lt;/div&gt;
    &lt;div class="item"&gt;Item&lt;/div&gt;
    &lt;div class="item"&gt;Item&lt;/div&gt;
    &lt;div class="item"&gt;Item&lt;/div&gt;
    &lt;div class="item"&gt;Item&lt;/div&gt;
    &lt;div class="item"&gt;Item&lt;/div&gt;
    &lt;div class="item"&gt;Item&lt;/div&gt;
    &lt;div class="item"&gt;Item&lt;/div&gt;
    &lt;div class="item"&gt;Item&lt;/div&gt;
    &lt;div class="item"&gt;Item&lt;/div&gt;
    &lt;div class="item"&gt;Item&lt;/div&gt;
    &lt;div class="item"&gt;Item&lt;/div&gt;
    &lt;div class="item"&gt;Item&lt;/div&gt;
    &lt;div class="item"&gt;Item&lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>How can I get the last row to be centered instead of left aligned?  I can't guarantee the number of items so want to make the layout look right for any number of items.</p>
  
  <p>Is this something I should be using flexbox for instead?  Or are CSS grids a suitable use?</p>