I have a div with the class row and several columns, one of them has a div with the class form-check, containing a label and a checkbox. What I need is to center this checkbox and label in the middle of the div, to align with the input on the side (image 3).
I’ve already tried padding/margin auto, align bottom, align middle, d-flex
.
.
Img 3
2
Answers
you can make the container flex and align center :
You should add
mx-auto
to the<div class='form-check mb-0'>
and addd-flex align-items-center
to the<div class='col-12 col-sm-3 col-md-2 mt-3'>
The final code should be like this: