Labels for checkboxes & radio buttons don't align properly (vertically) using Bootstrap Reboot
See original GitHub issueUsing Bootstrap Reboot the labels for either checkboxes or radio buttons don’t align vertically properly with the elements.
Example code:
<form>
<fieldset>
<div>
<label>
<input type="checkbox" value="" />
Check this checkbox
</label>
</div>
<div>
<label>
<input type="radio" name="optionsRadios" id="optionsRadios1" value="option1" checked="" />
Option one is this and that
</label>
<label>
<input type="radio" name="optionsRadios" id="optionsRadios2" value="option2" />
Option two is something else that's also super long to demonstrate the wrapping of these fancy form controls.
</label>
<label>
<input type="radio" name="optionsRadios" id="optionsRadios3" value="option3" disabled="" />
Option three is disabled
</label>
</div>
</fieldset>
</form>
Tested on
- Chrome 64.0.3282.186 (Official Build) (64-bit)
- macOS 10.12.6
EDIT: I think it’s better to align the labels to the middle of the checkbox/radio button?
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
My Checkboxes or Radio Buttons Do Not Align Properly?
It's because your .box class has the text-align set to center. So your labels are honoring that rule, as are the checkboxes.
Read more >Checks and radios · Bootstrap v5.1
Create button-like checkboxes and radio buttons by using .btn styles rather than .form-check-label on the <label> elements. These toggle buttons can further be ......
Read more >Components - Bootstrap
Over a dozen reusable components built to provide iconography, dropdowns, input groups, navigation, alerts, and much more. Glyphicons. Available glyphs.
Read more >Button group · Bootstrap v5.0
Group a series of buttons together on a single line or stack them in a vertical column. On this page. Basic example; Mixed...
Read more >List group · Bootstrap v5.0
Place Bootstrap's checkboxes and radios within list group items and customize as needed. You can use them without <label> s, but please remember...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
So, the easiest way to solve this is downgrade to Bootstrap 3.?
Codepen demo: https://codepen.io/anon/pen/NYKevX
Tested on : Bootstrap Reboot v4.0.0 Chrome 65.0.3325.146 (Official Build) (64-bit) macOS 10.12.6