Skip to content

Instantly share code, notes, and snippets.

@mortendk
Created December 22, 2011 23:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mortendk/1512271 to your computer and use it in GitHub Desktop.
Save mortendk/1512271 to your computer and use it in GitHub Desktop.
checkbox checked
/**
* checkbox checked
*/
div{display:inline-block;padding-top:100px}
label{ padding:15px; margin:50px; border-radius:10px; font-size:50px}
input[type=radio]{ position: absolute; top: -9999px; left: -9999px; }
input[type=radio] ~ label { background:red;}
input[type=radio]:checked ~ label { background:green;}
<div class="form-item form-type-radio">
<input type="radio" id="edit-field-pt-boolean-checkbox-one-und-0" value="0" name="foo">
<label for="edit-field-pt-boolean-checkbox-one-und-0">what</label>
</div>
<div class="form-item form-type-radio">
<input type="radio" id="edit-field-pt-boolean-checkbox-one-und-1" value="0" name="foo">
<label for="edit-field-pt-boolean-checkbox-one-und-1">ever</label>
</div>
{"view":"split-vertical","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment