/* Custom labels: the container */
.checkcontainer {
    display: block;
    position: relative;
    padding-left: 35px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 17px;
    -webkit-user-select: none; /* Chrome, Opera, Safari */
    -moz-user-select: none; /* Firefox 2+ */
    -ms-user-select: none; /* IE 10+ */
    user-select: none; /* Standard syntax */
}

/* Hide the browser's default checkbox */
.checkcontainer input {
  	position: absolute;
	  opacity: 0;
cursor: pointer;}

/* Create a custom checkbox */
.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 25px;
    width: 25px;
    background-color: #eee;
}

/* On mouse-over, add a grey background color */
.checkcontainer:hover input ~ .checkmark {
    background-color: #ccc;
}

/* When the checkbox is checked, add a blue background */
.checkcontainer input:checked ~ .checkmark {
    background-color: #2196F3;
}

/* Create the checkmark/indicator (hidden when not checked) */
.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

/* Show the checkmark when checked */
.checkcontainer input:checked ~ .checkmark:after {
    display: block;
}

/* Style the checkmark/indicator */
.checkcontainer .checkmark:after {
    left: 10px;
    top: 6px;
    width: 7px;
    height: 12px;
    border: solid white;
    border-width: 0 3px 3px 0;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
}

/* Create a custom radio button */
.radiobtn{
  position: absolute;
  top: 0;
  left: 0;
  height: 25px;
  width: 25px;
  background-color: #eee;
  border-radius: 50%;
}

/* On mouse-over, add a grey background color */
.checkcontainer:hover input ~ .radiobtn{
  background-color: #ccc;
}

/* When the radio button is checked, add a blue background */
.checkcontainer input:checked ~ .radiobtn{
  background-color: #2196F3;
}

/* Create the indicator (the dot/circle - hidden when not checked) */
.radiobtn:after {
  content: "";
  position: absolute;
  display: none;
}

/* Show the indicator (dot/circle) when checked */
.checkcontainer input:checked ~ .radiobtn:after {
  display: block;
}

/* Style the indicator (dot/circle) */
.checkcontainer .radiobtn:after {
  top: 9px;
  left: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: white;
}

/* usage */
/*
<div class="w3-row" style="padding:10px;border:4px solid #f1f1f1;">
<div class="w3-col s4">
<p><strong>Default:</strong></p>
<input type="checkbox" checked="checked"> One<br>
<input type="checkbox"> Two<br><br>
<input type="radio" name="same" checked="checked"> One<br>
<input type="radio" name="same"> Two
</div>

<div class="w3-col s4">
<p><strong>Custom checkbox:</strong></p>
<label class="checkcontainer">One
  <input type="checkbox" checked="checked">
  <span class="checkmark"></span>
</label>
<label class="checkcontainer">Two
  <input type="checkbox">
  <span class="checkmark"></span>
</label>
<label class="checkcontainer">Three
  <input type="checkbox">
  <span class="checkmark"></span>
</label>
<label class="checkcontainer">Four
  <input type="checkbox">
  <span class="checkmark"></span>
</label>
</div>

<div class="w3-col s4">
<p><strong>Custom radio button:</strong></p>
<label class="checkcontainer">One
  <input type="radio" checked="checked" name="radio">
  <span class="radiobtn"></span>
</label>
<label class="checkcontainer">Two
  <input type="radio" name="radio">
  <span class="radiobtn"></span>
</label>
<label class="checkcontainer">Three
  <input type="radio" name="radio">
  <span class="radiobtn"></span>
</label>
<label class="checkcontainer">Four
  <input type="radio" name="radio">
  <span class="radiobtn"></span>
</label>
</div>

</div>

*/