Test description
Testing several methods to choose images when they are part of input checkboxes in html web pages. Reason: we want to offer a selection of images. At the same time: testing support of attribute styles.
- The following browsers are tested:
- Opera 10
- Google Chrome 3
- Mozilla Firefox 3 and 3.5
- MS Internet Explorer 7
- The following CSS is used:
-
html, body, form, fieldset { background-color: #fff; color: #000}
input[type=checkbox], input[type=checkbox] + img {padding: 3mm; background-color:#fff}
input[checked=checked], input[checked=checked] + img{background-color:#000}
input[type=checkbox][checked=checked], input[type=checkbox][checked=checked] + img{background-color:#ccf}
input[type=checkbox]:hover, input[type=checkbox]:hover + img{ background-color:#cfc}
input[type=checkbox][checked=checked]:hover, input[type=checkbox][checked=checked]:hover + img{background-color:#fcc}
Test
Conclusion
Offering images in checkbox inputs can be used in all modern browsers, except MSIE7. That browser may require a bit of javascript. Styling of checkbox inputs and images differs greatly among the varying browsers. Dynamic styling via attribute selectors seems absent in all tested browsers.