I am trying to make it possible for the user to check a radiobutton while clicking on its parent's div.
Here is the code:
<td style="width: 17.5%">
<input
type="radio"
:id="item.subValue"
:name="item.fieldname"
/><label :for="item.subValue">{{ item.subValue }}</label>
</td>
As you can see, I am using a td, how can I make it that clicking on the td will let you check the radiobutton?
CodePudding user response:
<td>
<label :for="item.subValue">
<input
type="radio"
:id="item.subValue"
:name="item.fieldname"> {{ item.subValue }}
</label>
</td>
If you want label
to be full width of container add CSS display: block;
to it