Make text appear over options of a radio button - HTML CSS CSS Form

HTML CSS examples for CSS Form:input radio button

Description

Make text appear over options of a radio button

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">

ul {<!--  w w w.j  ava  2  s . c o m-->
   list-style: none;
   padding: 0;
   overflow: hidden;
}
li {
   float: left;
   width: 100px;
   position: relative;
   height: 100px;
}
input {
   visibility:hidden;
}
label {
   cursor: pointer;
}
input + label{
   position: absolute;
   bottom: 0;
}
input + label:before {
   background: #fff000;
   position: absolute;
   border-radius: 50%;
   width: 70px;
   height: 70px;
   line-height: 70px;
   bottom: 25px;
   left: 50%;
   display: block;
   content: '';
   text-align: center;
   margin-left: -35px;
}
input:checked + label:before {
   content: 'TICK';
}


      </style> 
 </head> 
 <body> 
  <ul> 
   <li> <input type="radio" value="1" name="radio" id="radio1"> <label for="radio1">Value 1</label> </li> 
   <li> <input type="checkbox" value="2" name="radio" id="radio2"> <label for="radio2">Value 2</label> </li> 
   <li> <input type="radio" value="3" name="radio" id="radio3"> <label for="radio3">Value 3</label> </li> 
  </ul>  
 </body>
</html>

Related Tutorials