title: CSS centering tricks
body: <p>My favorite equation for centering an xhtml element using only CSS is as follows:</p>
  
  <pre><code>display: block;
  position: absolute;
  width: _insert width here_;
  left: 50%;
  margin-left: _insert width divided by two &amp; multiplied by negative one here_
  </code></pre>
  
  <p>There's also the simpler margin:auto method in browsers that support it. Does anyone else have tricky ways to force content to display centered in its container? (bonus points for vertical centering)</p>
  
  <p>edit - oops, forgot the 'negative' part of one in the margin-left. fixed.</p>