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.

Custom Control Checkbox not working without label

See original GitHub issue

When ommitting the label tag in a custom-control-input, the checkbox is not showing up

<div class="custom-control custom-radio">
  <input type="radio" id="customRadio1" name="customRadio" class="custom-control-input">
</div>

Sometimes one would need a styled checkbox without a label, especially when working with selection lists or tables.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:37
  • Comments:22 (4 by maintainers)

github_iconTop GitHub Comments

8reactions
anthonyadamskicommented, Oct 19, 2019

Suggesting we reopen this. When hiding label using the “text-hide” method, checkboxes are still off centered due to the padding that exists to offset the label from the checkbox.

8reactions
cichy380commented, Nov 27, 2018

This problem starts from Bootstrap v4.1.1 (https://github.com/twbs/bootstrap/pull/25944)

Fix empty custom-control-label alignment issue Before: https://codepen.io/anon/pen/yRdegO After: https://codepen.io/anon/pen/bmPEgX

.custom-control-label {
  vertical-align: top;
}

source: https://github.com/twbs/bootstrap/pull/27566#issue-227128125

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bootstrap 4 Custom Checkbox Not Shown - Stack Overflow
Just add the missed class custom-control-label for label. You just want to follow custom forms Bootstrap-v4 form for reference.
Read more >
Custom Checkbox without <label /> - CodePen
Insecure Resource. The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https....
Read more >
Forms - Bootstrap
Examples and usage guidelines for form control styles, layout options, and custom components for creating a wide variety of forms.
Read more >
Pure CSS Custom Checkbox Style | Modern CSS Solutions
We'll create custom, cross-browser, theme-able, ... Common Issues With Native Checkboxes ... Our label uses the class of .form-control .
Read more >
Form Checkbox | Components - BootstrapVue
Custom checkbox input and checkbox group to replace the browser default checkbox input, ... HTML is supported in the html field (components will...
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