mhulse / css-issues

Practical CSS code snippets and examples.
11 stars 1 forks source link

Form radio and checkbox with label text that does not wrap under inputs #196

Open mhulse opened 6 years ago

mhulse commented 6 years ago
.tat_form input[type="checkbox"],
.tat_form input[type="radio"] {
    padding: 0;
    vertical-align: middle;
    position: absolute;
    left: 0;
    top: 0.15em;
}
.tat_form label input[type="checkbox"] + span,
.tat_form label input[type="radio"] + span {
    margin-left: 1.75rem;
}
<label>
    <input type="checkbox" name="workReasons[]" id="wr10" value="10">
    <span>Cannot work because parents/caregivers do not want him/her to work</span>
</label>