Radio / checkbox styles
by polaszk
HTML
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css">
<div class="radio-boxes">
<div class="radio-container">
<input id="input1" type="radio" name="radio" value="1" checked="">
<label for="input1">
<span>Option 1</span>
</label>
</div>
<div class="radio-container">
<input id="input2" type="radio" name="radio" value="2">
<label for="input2">
<span>Option 2</span>
</label>
</div>
</div>
CSS
.radio-boxes {
list-style-type: none;
}
input,
textarea {
box-sizing: border-box;
margin: 0;
outline: none;
display: none;
}
.radio-boxes input + label {
display: inline-block;
cursor: pointer;
position: relative;
left: 0;
width: calc(100% - 70px);
padding: 10px 10px 10px 64px;
line-height: 3;
min-height: 44px;
background-color: transparent;
color: #7f7f7f;
font-family: Verdana, sans-serif;
font-weight: 400;
border: 1px solid transparent;
transition: all 200ms ease;
}
.radio-boxes input + label:before {
content: "";
display: inline-block;
width: 44px;
height: 44px;
position: absolute;
left: 10px;
top: 50%;
color: #fff;
transform: translateY(-50%);
background-color: #ffffff;
border: 1px solid #ddd;
box-sizing: border-box;
border-radius: 10px;
transition: all 200ms ease;
}
.radio-boxes input:checked + label:before {
content: "\f00c";
font-family: FontAwesome;
font-style: normal;
font-weight: normal;
text-decoration: inherit;
background-color: #fff;
color: #3CB371;
border: 1px solid #3CB371;
font-size: 35px;
text-align: center;
line-height: 44px;
}