How can I move a label to the left of a checkbox in Bootstrap 3?
Is there anyway to get the text of a checkbox to be on the left side of the checkbox? I have tried and tried but cant get it working.
I have tried putting the span on top and that also doesn’t work, Then if I make it a blank checkbox and just put text in front then they don’t line up.
any help would be really appreciated.
Bootstrap styling will float the
checkbox elements to the left because of this styling:
To solve this, you could simply add
pull-right to the
input element’s class:
<input type="checkbox" id="checkbox1" class="checkbox style-2 pull-right" checked="checked"/>
It’s also worth noting that a
label element should have a
for attribute matching the input element’s
id attribute, like this: