I have tried styling my checkbox which has a class "checkBox" applied but no succes. Where am I wrong?
.checkBox .x-input-checkbox:checked + .x-field-mask:after {
content: "";
height: 45px;
width: 45px;
background-image:url(http://png-4.findicons.com/files/icons/2232/wireframe_mono/48/checkbox_checked.png);
background-size: contain;
display: block;
}
.checkBox .x-input-checkbox + .x-field-mask:after {
content: "";
height: 45px;
width: 45px;
background-image:url(http://png-2.findicons.com/files/icons/2232/wireframe_mono/48/checkbox_unchecked.png);
background-size: contain;
display: block;
}
<input type="button" id="markModeCheckbox-inputEl" role="checkbox" class="x-form-field x-form-checkbox x-form-cb " autocomplete="off" hidefocus="true" data-errorqtip="">
<label id="markModeCheckbox-boxLabelEl" class="x-form-cb-label x-form-cb-label-after" for="markModeCheckbox-inputEl">Box Label</label>
I am going to have multiple checkboxes which I want to style different depending on id or class
You should really use a DOM inspector like Firebug or the Chrome Developer Tools. Having a look at the DOM which is generated by ExtJS:
...the CSS selectors are quite obvious and very simple:
Note, that you cannot use the
:checked
pseudo-class, since the input type is button, not checkbox.However, you can use the CSS class
.x-form-cb-checked
which is applied when the checkbox is checked.Also see this fiddle (with ExtJS 4.2.1, since you did not state which version you are using)