Reputation: 2473
in a bootstrap form, the checkbox appears off to the right and the label is to the left. How to center the checkbox under the label?
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet"/>
<form>
<div class="form-row">
<div class="form-group col-md-2">
<label for="isNewPrice">New price?</label>
<input type="checkbox" class="form-control" id="isNewPrice" >
</div>
</div>
</form>
Upvotes: 0
Views: 1976
Reputation: 30975
Maybe with a text-center
class ?
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet"/>
<form>
<div class="form-row">
<div class="form-group col-md-2 text-center">
<label for="isNewPrice">New price?</label>
<input type="checkbox" class="form-control" id="isNewPrice" >
</div>
</div>
</form>
Upvotes: 1