title: Center div and fit contents?
body: <p>I want to center a div in the middle of my page, and have the div fit the contents. How can I do that?</p>
  
  <hr>
  
  <p>I've tried</p>
  
  <pre><code>width: 1px;
  white-space: nowrap;
  margin: 0 auto;
  </code></pre>
  
  <p>Which centers the div, but then all the text is to the right of that.</p>
  
  <p><code>display: inline-block</code> makes the div fit the contents, but then <code>margin: 0 auto;</code> doesn't seem to work...</p>