Created
December 10, 2012 17:21
-
-
Save svlasov/4251952 to your computer and use it in GitHub Desktop.
custom style checkboxes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.list { | |
list-style: none; | |
border: 1px solid blue; | |
width: 110px; | |
} | |
.elem { | |
display: inline-block; | |
border: 1px solid black; | |
width: 100px; | |
} | |
.elem input[type='checkbox'] { | |
opacity: 0; | |
float: left; | |
width: 0; | |
} | |
.elem input[type='checkbox'] + label { | |
margin: 0px; clear: none; | |
width: 100%; | |
/* Left padding makes room for image */ | |
padding: 0 30px 0 30px; | |
/* Make look clickable because they are */ | |
cursor: pointer; | |
background: red left center no-repeat; | |
} | |
.elem input[type='checkbox']:checked + label { | |
background: yellow left center no-repeat; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="list"> | |
<span class="elem"> | |
<input id="cb1" type="checkbox"> | |
<label for="cb1">bbb</lable> | |
</span> | |
<span class="elem"> | |
<input id="cb2" type="checkbox"> | |
<label for="cb2">qqq</lable> | |
</span> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// alert('Hello world!'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"view":"separate","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment