Monday, July 9, 2012

Radio Button to Toggle Button

if we are looking for solution where you need Radio button as Toggle button, here is one interesting solution. This we can achieve with just CSS. I have got this solution from

Copy this Style in Header
body {

#bounds {
    border:1px solid #D0D0D0;

#bounds label {

#bounds label span {
    padding:3px 0px;

#bounds label input {

#bounds input:checked span {

Copy this Style in Body
div id="bounds"
    <label><input type="radio" name="toggle"><span>Onspan>label>
    <label><input type="radio" name="toggle"><span>Offspan>label>

No comments: