Bootstrap 3 - Inline Form Checkbox Alignment

by Kyle Mitofsky

HTML

<link rel="stylesheet" href="//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css">
<link rel="stylesheet" href="http://getbootstrap.com/dist/css/bootstrap.css">
<script src="http://getbootstrap.com/dist/js/bootstrap.js"></script>
<form class="form-inline">
    <div class="checkbox">
        <label><input type="checkbox"/> Inline Form </label>
    </div>
</form>

<form class="form-horizontal">
    <div class="checkbox">
        <label><input type="checkbox"/> Horizontal Form </label>
    </div>
</form>

<br/>

<div class="alert alert-danger visible-xs">
    Must be 768px wide to see alignment issue <br/>
    <b>Current Width: <span id="holster"></span>px</b>
</div>








<!-- Post Info -->
<div style='position:fixed;bottom:0;left:0;    
            background:lightgray;width:100%;'>
    About this SO Question: <a href='http://stackoverflow.com/q/24398901/1366033'>Bootstrap 3 form checkbox label doesn't align with checkbox input</a><br/>
    Fork This Skeleton Here: <a href='http://jsfiddle.net/KyleMit/kcpma/'>Bootstrap 3.0 Skeleton</a><br/>
<div>

CSS

body {
    padding: 5px;
}
.checkbox label {
    border: 1px solid grey;
}

JavaScript

$(window).resize(function() {
    $("#holster").html($(window).width());
}).resize();