Okay, Andrew.
Why doesn't this work?
Code:
<!DOCTYPE html>
<html lang="en-GB">
<head>
<meta charset="utf-8">
<meta name="keywords" content="key, words">
<meta name="description" content="description">
<title>Check It</title>
<style type="text/css">
label {
display: block;
margin-top: 2px; margin-bottom: 2px;
}
label.checking input[type=checkbox] {
display: inline;
width: 1.2em;
vertical-align: middle;
outline: none;
opacity: 0;
width: 18px; height: 18px;
margin: 0 0 0 8px; padding: 0;
z-index: 10;
}
span.checking {
margin: 0;
padding: 0 0 0 18px;
position: relative; left: -18px;
z-index: 25;
height: 18px;
background: url('images/checkblank.png') right center no-repeat;
}
label.checking input[type=checkbox]:checked + span.checking {
background: url('images/checktick.png') right center no-repeat;
}
span.red {
color: red;
}
label.checking input[type=checkbox]:checked + span.red {
color: green;
}
</style>
</head>
<body>
<label class="checking"><input type="checkbox" id="remember"
name="remember" value="yes"><span class="checking"></span
><span class="red">Remember me</span
></label>
</body>
</html>
Why will it change the background of <span class="checking"> but not the color of <span class="red"> ???