evenly align checkboxes in a vertical line next to list items - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:UL Alignment

Description

evenly align checkboxes in a vertical line next to list items

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 {<!--   w  w  w .j  av a  2 s.  c  o  m-->
   display:block;
   padding-left:16px;
   text-indent:-16px;
}

input {
   width:14px;
   height:14px;
   padding:0;
   margin:0;
   vertical-align:bottom;
   position:relative;
   top:-2px;
   *overflow:hidden;
}
</style> 
 </head> 
 <body> 
  <ol class="nested"> 
   <li class="nested"> <label> <input type="checkbox">Lorem ip</label> </li> 
   <ol class="nested"> 
    <li class="nested"> <label> <input type="checkbox">Lorem ip</label> </li> 
    <li class="nested"> <label> <input type="checkbox">Lorem ips</label> </li> 
   </ol> 
   <li class="nested"> <label> <input type="checkbox">Lorem</label> </li> 
   <li class="nested"> <label> <input type="checkbox">Lorem </label> </li> 
  </ol>  
 </body>
</html>

Related Tutorials