samedi 9 janvier 2016

Custom check box in css not working

I am newbie to CSS and jQuery . I tried to customize the check box and but isn't working . Can you please debug this .

Here is my code:

.checkbox-custom{
    opacity: 0;
    position: absolute;   
}
.checkbox-custom, .checkbox-custom-label{
    display: inline-block;
    vertical-align: middle;
    margin: 5px;
    cursor: pointer;
}
.checkbox-custom-label {
    position: relative;
}
.checkbox-custom + .checkbox-custom-label:before{
    content: '';
    background: #fff;
    border: 2px solid #ddd;
    display: inline-block;
    vertical-align: middle;
    width: 20px;
    height: 20px;
    padding: 2px;
    margin-right: 10px;
    text-align: center;
}
.checkbox-custom:checked + .checkbox-custom-label:before {
    content: "\f095";
    font-family: 'FontAwesome';
    background: rebeccapurple;
    color: #fff;
}
<input id="checkbox-3" class="checkbox-custom" name="checkbox-3" type="checkbox">
<label for="checkbox-3"class="checkbox-custom-label">Third Choice</label>

And my output looks like ,

http://ift.tt/1kWYA7F

Can anyone help me to debug this .




Aucun commentaire:

Enregistrer un commentaire