Checkbox innertext not showing in webkit, but works fine in Firefox?

Before I spend any more time trying to unravel this, I figured I'd ask here in case it's a common issue. I have a custom-styled checkbox to look like a toggle button. This is just an <input type="checkbox"> with some innertext. It works as expected on FF, but collapses on Chrome. Even manually setting the width of the element does not show any text, though it does exist in the inspector. Is this just a limitation/ quirk of webkit? Or am I missing something else?
No description
2 Replies
Jochem
Jochem12mo ago
I'm pretty sure you're not supposed to set an inner text on a checkbox use a label, nest the checkbox inside and hide it, then style the label
bluetomato
bluetomatoOP12mo ago
Ah, ok. I liked the simplicity of this approach, but I'll try what you suggested, thanks!
Want results from more Discord servers?
Add your server