Ol li have left margin and left align - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:UL Alignment

Description

Ol li have left margin and left align

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">
li.A {
   list-style-type:decimal;
   font-weight:bold;
   margin-bottom:16px;
}

li.B {
   list-style-type:upper-alpha;
   font-weight:normal;
   margin-top:5px;
   margin-bottom:5px;
}

ol {<!-- w ww. ja va  2 s. c  om-->
   padding-left:0px;
   list-style-position:inside;
}
</style> 
 </head> 
 <body> 
  <form id="form1" runat="server"> 
   <div> 
    <p>Lorem ipsum dolor</p> 
    <ol> 
     <li class="A">Lorem ipsum dolor sit amet, consectetur 
      <ol class="C"> 
       <li class="B">Lorem ipsum dolor sit amet, consectetur</li> 
      </ol> </li> 
     <li class="A">Lorem ipsum dolor sit amet, consectetur 
      <ol class="C"> 
       <li class="B">Lorem ipsum dolor sit amet, </li> 
      </ol> </li> 
    </ol> 
   </div> 
  </form>  
 </body>
</html>

Related Tutorials