Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>Custom Radio</title>
</head>
<body>
<div class="set-appointment-container">
  <span>
  <input id="appointment-yes" type="radio" name="set-appointment" value="yes" />
  <label class="yes-label" for="appointment-yes"></label> 
  <input id="appoinment-no" type="radio" name="set-appointment" value="no" />
  <label class="no-label" for="appoinment-no"></label>
  </span>
</div>
</body>
</html>
 
input[type=radio] {  
    display: none;  
}
label {  
    display: inline-block;
    width: 32px;
    height: 29px;
    cursor: pointer;  
    position: relative;  
}  
input[type=radio]:checked + label:before {
    text-align: center;
    content: "Y";
    width: 32px;
    height: 29px;
    background-color: #45ce4c;
}  
.yes-label:before {  
    content: "Y";  
    text-align: center;
    display: inline-block;  
  
    width: 32px;  
    height: 29px;  
  
    margin-right: 10px;  
    position: absolute;    
    background-color: #cccccc;  
}  
.no-label:before {  
    content: "N"; 
    text-align: center;
    display: inline-block;  
  
    width: 32px;  
    height: 29px;  
  
    position: absolute;  
    background-color: #cccccc;  
}  
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
freannrakpro
0viewers