I'm using Materialize and I'm trying to make a table that contains checkboxes. However, there seems to be a problem. A checkbox contained within a table doesn't seem to work. I'm not sure if this a bug or if I'm not doing something correct:
<form action="#">
<table>
<thead>
<tr>
<th>Name</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<tr>
<td>My Label</td>
<td><input type="checkbox" class="filled-in" /><label></label></td>
</tr>
</tbody>
</table>
</form>
How do I make a checkbox contained within a table using Materialize?
http://jsfiddle.net/qa37un79/
You did not have an id
for the checkbox and matching for
attribute for the label:
<input type="checkbox" id="myCheckbox" class="filled-in" />
<label for="myCheckbox"></label>
http://jsfiddle.net/xcmsLee9/1/
Try this:
<label>
<input type="checkbox" />
<span>*** Need text here ***</span>
</label>
Wrapping everything in a label
element with a span
right under it was the only way I was able to get my checkboxes to display.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With