question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Labels for checkboxes & radio buttons don't align properly (vertically) using Bootstrap Reboot

See original GitHub issue

bootstrap4 reboot forms

Using 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?

bs_reboot_align

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
MR-T77commented, Mar 9, 2019

So, the easiest way to solve this is downgrade to Bootstrap 3.?

1reaction
pataterocommented, Mar 8, 2018

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found