Full width horizontal rule in an ordered list - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:UL Horizontal

Description

Full width horizontal rule in an ordered list

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">
.left {
   float:left;
}

ol {<!-- w w w.j av  a2 s  .c o  m-->
   padding-left:31px;
   counter-reset:n;
}

li {
   border-bottom:3px groove Chartreuse;
   list-style:none;
}

li::before {
   counter-increment:n;
   content:counter(n) ".";
   float:left;
   margin-right:11px;
}
</style> 
 </head> 
 <body> 
  <ol> 
   <li> 
    <div class="left"> 
     <img src="https://www.java2s.com/style/demo/Google-Chrome.png" alt="test"> 
    </div> 
    <div> 
     <p>Lore</p> 
    </div> </li> 
   <li> 
    <div class="left"> 
     <img src="https://www.java2s.com/style/demo/Google-Chrome.png" alt="test"> 
    </div> 
    <div> 
     <p>Lore</p> 
    </div> </li> 
   <li> 
    <div class="left"> 
     <img src="https://www.java2s.com/style/demo/Safari.png" alt="test"> 
    </div> 
    <div> 
     <p>Lore</p> 
    </div> </li> 
  </ol>  
 </body>
</html>

Related Tutorials