I generated a custom CSS checkbox from csscheckbox.com and wanted to know if there was a way to change the width of the box on the fly.
I've attached the key css and html that is used to generated the checkbox so you can take a look. Ideally, I'd like to be able to change the width and the height of the checkbox just as I've changed the position of it using the div (but I know it probably isn't that simple).
input[type=checkbox].css-checkbox {
position:absolute;
z-index:-1000;
left:-1000px;
verflow: hidden;
clip: rect(0 0 0 0);
height:1px;
width:1px;
margin:-1px;
padding:0;
border:0;
}
input[type=checkbox].css-checkbox + label.css-label, input[type=checkbox].css-checkbox + label.css-label.clr {
padding-left:25px;
height:20px;
display:inline-block;
line-height:20px;
background-repeat:no-repeat;
background-position: 0 0;
font-size:20px;
vertical-align:middle;
cursor:pointer;
}
input[type=checkbox].css-checkbox:checked + label.css-label, input[type=checkbox].css-checkbox + label.css-label.chk {
background-position: 0 -20px;
}
label.css-label {
background-image:url(http://csscheckbox.com/checkboxes/u/csscheckbox_1fa1a7b77abfce3de56af87fcec6bed3.png);
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
<div style="position:absolute;top:0;left:0;">
<input type="checkbox" name="checkboxG4" id="checkboxG4" class="css-checkbox">
<label for="checkboxG4" class="css-label radGroup1 clr">Option 1</label>
</div>