Skip to content

Instantly share code, notes, and snippets.

@tagliala
Created February 26, 2013 11:38
Show Gist options
  • Save tagliala/5037860 to your computer and use it in GitHub Desktop.
Save tagliala/5037860 to your computer and use it in GitHub Desktop.
Pure CSS3 filled-in Radio Buttons feat. FontAwesome
.circle-radio-boxes {
margin-left: -10px;
padding-top: 5px;
}
.circle-radio-boxes input[type=radio] {
visibility: hidden;
position: absolute !important;
top: -9999px !important;
left: -9999px !important;
}
.circle-radio-boxes label {
display: inline-block;
font-family: FontAwesome;
margin-left: 10px;
}
.circle-radio-boxes label:before {
content: "\f111";
}
.circle-radio-boxes input[type=radio]:checked ~ label:before {
content: "\f10c";
}
<div class="circle-radio-boxes">
<label for="optionsRadios1"></label>
<input type="radio" name="optionsRadios" id="optionsRadios1" value="option1"/>
<label for="optionsRadios2"></label>
<input type="radio" name="optionsRadios" id="optionsRadios2" value="option2" checked="checked"/>
<label for="optionsRadios3"></label>
<input type="radio" name="optionsRadios" id="optionsRadios3" value="option3"/>
<label for="optionsRadios4"></label>
<input type="radio" name="optionsRadios" id="optionsRadios4" value="option4"/>
</div>
@tagliala
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment