Skip to content

Instantly share code, notes, and snippets.

@mufaddalmw
Created April 19, 2013 04:52
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 mufaddalmw/5418220 to your computer and use it in GitHub Desktop.
Save mufaddalmw/5418220 to your computer and use it in GitHub Desktop.
/*checkbox style*/
.checkbox input[type=checkbox] {opacity:0; position:absolute;}
.checkbox label {display:inline-block; padding:3px 3px 3px 26px; background:url(../img/glyphicons-halflings.png) no-repeat -446px -5px;}
.checkbox input[type=checkbox]:checked + label {background-position:-446px -35px;}
.lt-ie9 .checkbox label {background:none;}
.lt-ie9 .checkbox input{margin-top: 2px;}
/*checkbox disabled style*/
.checkbox input[type=checkbox]:disabled + label {background-position:-446px -65px;}
.checkbox input[type=checkbox]:disabled:checked + label {background-position:-446px -95px;}
/*radio style*/
.radio input[type=radio] {opacity:0; position:absolute;}
.radio label {display:inline-block; padding:3px 3px 3px 26px; background:url(../img/glyphicons-halflings.png) no-repeat -447px -138px;}
.radio input[type=radio]:checked + label {background-position:-447px -168px;}
.lt-ie9 .radio label {background:none;}
.lt-ie9 .radio input {margin-top: 2px;}
/*radio disabled style*/
.radio input[type=radio]:disabled + label {background-position:-447px -198px;}
.radio input[type=radio]:disabled:checked + label {background-position:-447px -228px;}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment