Radio button style label

by timspqr

HTML

<input type="radio" id="radio1" name="radios" value="all" checked>
   <label for="radio1">A</label>
<input type="radio" id="radio2" name="radios"value="false">
   <label for="radio2">B</label>
<input type="radio" id="radio3" name="radios" value="true">
   <label for="radio3">C</label>

CSS

input[type=radio] {
    display:none; 
    margin:10px;
}
input[type=radio] + label {
    display:inline-block;
    margin:-2px;
    padding: 4px 12px;
    background-color: #e7e7e7;
    border-color: #ddd;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    line-height: 50px;
    font-size: 30px;
    text-align: center;
}
input[type=radio]:checked + label { 
   background-image: none;
   background-color: red;
   color: white;

JavaScript

/*
http://viralpatel.net/blogs/css-radio-button-checkbox-background/
*/