I thought of visited too, but can't get it to work
That's an issue with webkit, which doesn't like to apply any other attribute other than color: to a:visited.
Just so you know, what you are trying to do really violates separation of style and functionality ( not to be confused with keeping content and style separate). But looking the other way... you could do this ( tho for the afore mentioned reason i would advice against it)
You could have an ending step coded outside and previous to your element.
Code:
<!DOCTYPE HTML>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
.done:checked + .stuff {background:pink;}
.PosContext{position: relative; border: 1px solid #000; margin-bottom:1em}
.stuff {padding:1em 1em 2em 1em;}
.done {position: absolute; }
label.done {left: 2em; bottom:.5em}
input.done {left: 1.25em; bottom:.75em}
</style>
</head>
<body>
<div class="PosContext">
<input class="done" type='checkbox' id="lastItem1">
<div class='stuff'> your other form controls here
<label for="lastItem1" class='done'> 'ok am done' equivalent </label>
</div>
</div>
<div class="PosContext">
<input class="done" type='checkbox' id="lastItem2">
<div class='stuff'> your other form controls here
<label for="lastItem2" class='done'> 'ok am done' equivalent </label>
</div>
</div>
</body>
</html>
This is just for proof of concept , and ad it will limit your support ( tho most modern browsers will handle this).
Hope that helps.
Bookmarks