title: Clear float on Bootstrap col to center div
body: <p>I'm new to Bootstrap and have a problem which I have fixed using a work around - but I thought I'd see if Bootstrap has a built in way to handle this as it's a fairly standard issue  (I would have thought).</p>
  
  <p>What I have is a simple login page and I want my login form to be centered at all possible sizes. I have used bootstrap css col-lg-4 coll-lg-offset-4 which should center the div but it does not due to a float-left that is included in all sizes of col. A quickfix was to create a css class and adding it to my col class:</p>
  
  <pre><code>.nofloat {
   float:none;
  }
  </code></pre>
  
  <p>Is there a better way to do this without having to add to my custom css?</p>
  
  <p>Here's the code for the form which won't center on large screens:</p>
  
  <pre><code>&lt;div class="container-fluid"&gt;
  &lt;div class="row"&gt;
      &lt;div class="col-lg-4 col-lg-offset-4"&gt; &lt;!-- This is where I add my nofloat current fix --&gt;
        &lt;form role="form" action='&lt;?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?&gt;' method="post"&gt;
          &lt;h2&gt;Please sign in&lt;/h2&gt;
          &lt;label for="inputEmail" class="sr-only"&gt;Email address&lt;/label&gt;
          &lt;input type="email" id="inputEmail" name="username" class="form-control" placeholder="Email address" required autofocus&gt;
          &lt;label for="inputPassword" class="sr-only"&gt;Password&lt;/label&gt;
          &lt;input type="password" id="inputPassword" name="password" class="form-control" placeholder="Password" required&gt;
          &lt;div class="checkbox"&gt;
            &lt;label&gt;
                &lt;input type="checkbox" value="remember-me" /&gt;Remember me
            &lt;/label&gt;
          &lt;/div&gt;
          &lt;button class="btn btn-lg btn-primary btn-block" type="submit"&gt;Sign in&lt;/button&gt;
          &lt;a href="./forgotPassword.php"&gt;&lt;p class="text-center"&gt;Forgot password&lt;/p&gt;&lt;/a&gt;
        &lt;/form&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;/div&gt;
  </code></pre>