Here is my code:
td{
white-space: nowrap;
}
table{
text-align: center;
}
input[type="checkbox"]{
-ms-transform: scale(2); /* IE */
-moz-transform: scale(2); /* FF */
-webkit-transform: scale(3); /* Safari and Chrome */
-o-transform: scale(2); /* Opera */
padding: 10px;
}
#td_check{
padding-bottom: 0PX;
padding-top: 4px;
}
<table>
<tr style="border-color:#FFFFFF">
<td id="td_check"><input name="ch1" type="checkbox"></td>
<td id="td_check"><input name="ch1" type="checkbox"></td>
<td id="td_check"><input name="ch1" type="checkbox"></td>
<td id="td_check"><input name="ch1" type="checkbox"></td>
<td id="td_check"><input name="ch1" type="checkbox"></td>
<td id="td_check"><input name="ch1" type="checkbox"></td>
<td id="td_check"><input name="ch1" type="checkbox"></td>
<td id="td_check"><input name="ch1" type="checkbox"></td>
<td id="td_check"><input name="ch1" type="checkbox"></td>
<td id="td_check"><input name="ch1" type="checkbox"></td>
<td id="td_check"><input name="ch1" type="checkbox"></td>
<td id="td_check"><input name="ch1" type="checkbox"></td>
</tr>
</table>
I want to every checkbox in the table fill the parent(table cell). I mean every cell fill with a check box. If I change the width of the checkbox it does not work in the Firefox browser.
If it ispossible, how can I do it?
3there instead of2. This causes it not to work for me in webkit based browsers.#td_check, apply a class.td_check. And why do you want to achieve that ?offsetWidthandoffsetHeightof the cell and the checkbox and calculate the ratio to scale the checkbox. Checkboxes are tough to style, here are some hints.