title: Adding margin to table makes it overflow the parent
body: <p>I have a page which expands as the number of columns in the table increase. As long as I don't add a margin to the <code>div</code> containing the table, the page table doesn't overflow the parent. But when I add a <code>margin-left:2px</code> to the <code>div</code> containing the table, it overflows the parent. How can this be avoided?</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>.canvas{
      margin-left: 20%;
      display: inline-block;
      min-width: 60%;
  }
  .canvas .column-table {
      margin-left: 2%;
      margin-top: 2%;
      margin-bottom: 2%;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="canvas"&gt;
      &lt;div class="column-table"&gt;
          &lt;table id="main-table"&gt;
              &lt;tr id="row1"&gt;
              &lt;/tr&gt;
              &lt;tr id="row2"&gt;
              &lt;/tr&gt;
          &lt;/table&gt;
      &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>