title: How to center a handsontable properly
body: <p>I am using handsontable and I would like to show a table centered in the page or a div.</p>
  
  <p>I have managed to do this by changing the width of the container div after the table is initiated (see snippet). However this seems cumbersome.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$(document).ready(function () {
  
    var container = document.getElementById('basic_example');
    
    var hot = new Handsontable(container, {
      data: Handsontable.helper.createSpreadsheetData(10, 12),
      colHeaders: true,
      rowHeaders: true,
      afterInit: function () {
        $("#basic_example").css("width", $("#basic_example .wtHider").css("width")) 
      }
    });
    
  });</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>#basic_example {
    margin-left: auto;
    margin-right: auto;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;link href="http://handsontable.com//styles/main.css" rel="stylesheet"&gt;
  &lt;link href="http://handsontable.com//bower_components/handsontable/dist/handsontable.full.min.css" rel="stylesheet"&gt;
  &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="http://handsontable.com//bower_components/handsontable/dist/handsontable.full.min.js"&gt;&lt;/script&gt;
  
  &lt;div id="basic_example"&gt;&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Is there an easy/better way of centering a handsontable?</p>