The text-center
centers the label "check this custom checkbox" but the input remains on the left.
If you remove that custom-control-input
class then you will see a new checkbox input which will be centered and the bootstrap input will still be there on the left and it will be unclickable.
I want to center the whole thing.
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<div class="custom-control custom-checkbox text-center">
<input type="checkbox" class="custom-control-input" id="customCheck1">
<label class="custom-control-label" for="customCheck1">Check this custom checkbox</label>
</div>
Aucun commentaire:
Enregistrer un commentaire