Return to Snippet

Revision: 71027
at December 2, 2016 05:45 by mattvbiggs


Initial Code
<!-- The HTML -->
<div class="checkbox-label"><input type="checkbox" /><span>Remember me</span></div>

// The CSS
.checkbox-label {
  display: inline;
  font-size: 12px;
  padding-left: 5px;
}

.checkbox-label span {
    padding-left: 5px;
    padding-bottom: 15px;
    vertical-align: bottom;
    line-height: 22px;
}

Initial URL

                                

Initial Description
Aligning a label with a checkbox can be tricky. Here is the HTML and CSS I used to achieve it.

Initial Title
Aligning Checkbox with Label

Initial Tags
css, html5

Initial Language
CSS