Custom Radio Buttons

Submitted by:Pitter Alderson

Date added:10 May, 2012

Category:CSS

CSS code for custom radio buttons

Tags: radio buttons

Code Snippet:

#foo:checked::before,
input[type="checkbox"] {
position:absolute;
clip: rect(0,0,0,0);
clip: rect(0 0 0 0);
}

#foo:checked,
input[type="checkbox"] + label::before {
content: url('checkbox.png');
}

input[type="checkbox"]:checked + label::before {
content: url('checkbox-checked.png');
}
 
 

Comments