To achieve the effect you need to use + in the rules. eg:
.ava_radio:checked + .ava_img > img { border:solid 1px #ededed; }
You can and without > img
, but then you have to come up with the size and display
for the label
, which do not coincide with img
...
Accordingly, in order to work in ie7, in jquery you can use this selector in the change handler:
$(".ava_radio:not(:checked) + .ava_img > img").css("border","solid 1px white"); $(".ava_radio:checked + .ava_img > img").css("border","solid 1px #ededed");