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.

Checkboxes won't render without label, and label needs to be in the right place

See original GitHub issue

I’ve noticed that checkboxes only appear if they are coded like this: <input type="checkbox" id="checkboxid"><label for="checkboxid">Yes?</label>

These do not work: <input type="checkbox" id="checkboxid"> <label for="checkboxid">Yes?</label><input type="checkbox" id="checkboxid"> <label>Yes?<input type="checkbox" id="checkboxid"></label> <label><input type="checkbox" id="checkboxid">Yes?</label>

Thanks!

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:17
  • Comments:22 (3 by maintainers)

github_iconTop GitHub Comments

9reactions
KokoDokocommented, Oct 12, 2016

👍 Same problem here. Why does the whole checkbox disappear if there is no label? I don’t want my checkboxes to have a label… I can’t even use the class ‘browser-default’ to make a regular html checkbox appear…

8reactions
MicahStevenscommented, Nov 6, 2016

Not a real solution, but when using checkboxes in a datagrid, I used the following CSS to get them to show up without labels:

 [type="checkbox"]:not(:checked), [type="checkbox"]:checked {
    position: static;
    left: 0px; 
    opacity: 1; 
  }
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to align checkboxes and their labels consistently cross ...
Put each checkbox and label within an <li> element. Add overflow:hidden to the <li> and float the label and checkbox left. Then they...
Read more >
Should checkbox labels be to the right or the left?
In any Windows software development environment a checkbox's label will be on the right hand side of the checkbox automatically. There is no...
Read more >
<input type="checkbox"> - HTML: HyperText Markup Language
<input> elements of type checkbox are rendered by default as boxes that are checked (ticked) when activated, like you might see in an ......
Read more >
Ugh check boxes - HTML-CSS - The freeCodeCamp Forum
I would like the check boxes to stay to the right of the labels, ... that the input would need to go first...
Read more >
Checkbox - Accessibility Matters
If the user clicked on the text, it won't be activated. This is not good. Associating the label with the input. To achieve...
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