title: Center Form using Twitter Bootstrap
body: <p>I am using Twitter's Bootstrap to build a form (served by django). I want to have the form centered on the page but I'm running into some problems.</p>
  
  <p>Here is my HTML:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
    &lt;head&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;title&gt;My Form&lt;/title&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
      &lt;meta name="description" content=""&gt;
      &lt;meta name="author" content=""&gt;
  
      &lt;!-- Le styles --&gt;
      &lt;link href="/bootstrap/css/bootstrap.css" rel="stylesheet"&gt;
      &lt;style&gt;
        body {
          padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
        }
      &lt;/style&gt;
      &lt;link href="/bootstrap/css/bootstrap-responsive.css" rel="stylesheet"&gt;
  
      &lt;!-- Le HTML5 shim, for IE6-8 support of HTML5 elements --&gt;
      &lt;!--[if lt IE 9]&gt;
        &lt;script src="http://html5shim.googlecode.com/svn/trunk/html5.js"&gt;&lt;/script&gt;
      &lt;![endif]--&gt;
    &lt;/head&gt;
  
    &lt;body&gt;
      &lt;div class="container"&gt;
          &lt;div class="row"&gt;
              &lt;div class="span12" style="text-align:center; margin: 0 auto;"&gt;
                  &lt;form class="form-horizontal" method="post" action="/form/"&gt;
                      &lt;fieldset&gt;
                          &lt;legend&gt;Please login&lt;/legend&gt;
                          &lt;div class="control-group"&gt;
                              &lt;label class="control-label" for="id_username"&gt;Username&lt;/label&gt;
                              &lt;div class="controls"&gt;
                                  &lt;input name="username" maxlength="100" placeholder="Enter your username..." type="text" class="input-large" id="id_username" /&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                          &lt;div class="control-group"&gt;
                              &lt;label class="control-label" for="id_password"&gt;Password&lt;/label&gt;
                              &lt;div class="controls"&gt;
                                  &lt;input name="password" maxlength="100" placeholder="Enter your password..." type="password" class="input-large" id="id_password" /&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                      &lt;/fieldset&gt;
                  &lt;/form&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;!-- Le javascript
      ================================================== --&gt;
      &lt;!-- Placed at the end of the document so the pages load faster --&gt;
      &lt;script src="/bootstrap/js/jquery.js"&gt;&lt;/script&gt;
      &lt;script src="/bootstrap/js/bootstrap-transition.js"&gt;&lt;/script&gt;
      &lt;script src="/bootstrap/js/bootstrap-alert.js"&gt;&lt;/script&gt;
      &lt;script src="/bootstrap/js/bootstrap-modal.js"&gt;&lt;/script&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I've excluded some additional django logic ({% csrf_token %}, some if statements, etc), but this should recreate the problem. </p>
  
  <p>The actual input elements (username and password textboxes) are centering like I expected, but the labels remain to the far left of the page. Am I missing markup somewhere or do I have to override some of the control-label CSS?</p>