Count two level ordered list - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:UL Element

Description

Count two level ordered list

Demo Code

ResultView the demo in separate window

<html lang="en">
 <head> 
  <style>
#test li {<!--from www  .  j a va2 s  .c  o  m-->
   font-size:17px;
   padding:3px 0;
   display:block;
   margin-left:11px
}

#test h3 {
   display:inline-block;
   padding:0 0 6px 0;
}

#test ol, ul {
   list-style-type:decimal;
}

#test li:before {
   content:counters(item, ".") " ";
   counter-increment:item
}

#test ol {
   counter-reset:item;
   margin:0
}

#test h3>li {
   font-size:27px;
}

ol :before {
   font-size:41px;
}
</style> 
 </head> 
 <body translate="no"> 
  <div id="test"> 
   <ol> 
    <li> <h3>Lore</h3> 
     <ol class="topLevel"> 
      <li> <a href="#">Lorem ipsum </a> </li> 
      <li> <a href="#">Lorem ipsum </a> </li> 
      <li> <a href="#">Lorem ipsum </a> </li> 
     </ol> </li> 
    <li> <h3>Lore</h3> 
     <ol> 
      <li> <a href="#">Lorem ipsum </a> </li> 
      <li> <a href="#">Lorem ipsum </a> </li> 
      <li> <a href="#">Lorem ipsum </a> </li> 
     </ol> </li> 
    <li> <h3>Lore</h3> 
     <ol> 
      <li> <a href="??#??">Lorem ipsum </a> </li> 
      <li> <a href="??#??">Lorem ipsum </a> </li> 
      <li> <a href="??#??">Lorem ipsum </a> </li> 
     </ol> </li> 
   </ol> 
  </div>  
 </body>
</html>

Related Tutorials