You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In v5.0, checkboxes and radios inside .input-group-text elements appear too low (not vertically centered) due to margin-top: .25em set by .form-check-input. v4.6 has:
Alternatively, change the docs example to put the checkbox inside a .form-check, which appears to vertically center the checkbox:
<divclass="input-group mb-3"><divclass="input-group-text"><divclass="form-check"><inputclass="form-check-input" type="checkbox" value="" aria-label="Checkbox for following text input"></div></div><inputtype="text" class="form-control" aria-label="Text input with checkbox"></div><divclass="input-group"><divclass="input-group-text"><divclass="form-check"><inputclass="form-check-input" type="radio" value="" aria-label="Radio button for following text input"></div></div><inputtype="text" class="form-control" aria-label="Text input with radio button"></div>
However, this adds extra whitespace on the right/end, so it is only a solution if followed by a text label.
bggardner
changed the title
[v5] form-check-input inside input-group-text needs margin-top removed
[v5] form-check-input inside input-group-text is not vertically centered
Jan 20, 2021
In v5.0, checkboxes and radios inside
.input-group-text
elements appear too low (not vertically centered) due tomargin-top: .25em
set by.form-check-input
. v4.6 has:The fix would be to add either the same as v4.6 or
.input-group-text .form-check-input { margin-top: 0; }
The text was updated successfully, but these errors were encountered: