title: What's the best way to align nested divs to parent divs and text inside divs?
body: <p>So I made this example here: <a href="http://jsfiddle.net/cRmCc/2/" rel="nofollow">http://jsfiddle.net/cRmCc/2/</a> and I was wondering what would be the best way to vertically and horizontally align nested divs inside a parent div with out using margin or padding. More preferably the exact center. I'll be using this as a reference and Google isn't that much of a help. Thanks! </p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;div class="container1"&gt;
      &lt;div class="container2"&gt;
          Some Text
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>CSS</strong></p>
  
  <pre><code>.container1 {
      width:200px;
      height:200px;
      background-color:red;
  }
  .container2 {
      width:100px;
      height:100px;
      background-color:blue;
  }
  </code></pre>