Span with radio button underneath - HTML CSS CSS Form

HTML CSS examples for CSS Form:input radio button

Description

Span with radio button underneath

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">

label{float:left; margin-right:5px; text-align:center}/*Add*/
.color {
   height: 20px;
   width: 25px;
   /*display: inline-block;*/ /*Remove*/
   display: block;
   text-align:left;
}
.red { background: red; }


      </style> 
 </head> <!--   w ww . j  ava2 s  . c  o m-->
 <body> 
  <label class="radio-inline"> <input type="radio" name="inlineRadioOptions" id="inlineRadio1" value="option1"> <span class="color red"></span> </label> 
  <label class="radio-inline"> <input type="radio" name="inlineRadioOptions" id="inlineRadio2" value="option2"> <span class="color red"></span> </label> 
  <label class="radio-inline"> <input type="radio" name="inlineRadioOptions" id="inlineRadio3" value="option3"> <span class="color red"></span> </label>  
 </body>
</html>

Related Tutorials