make my <ol> list horizontal scroll - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:UL Horizontal

Description

make my <ol> list horizontal scroll

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">
.scroll {<!-- w w w  .  j a  v a 2  s.c o m-->
   overflow-y:scroll;
   white-space:nowrap;
   background-color:Chartreuse;
}

.card {
   float:left;
   width:241px;
   list-style-type:none;
}

#container {
   height:6%;
   width:auto;
}
</style> 
 </head> 
 <body> 
  <div> 
   <section class="scroll"> 
    <ol> 
     <li class="card"> <a href="#"> <img src="https://www.java2s.com/style/demo/Google-Chrome.png"> </a> <p class="castname"> <a href="#">Lorem ipsu</a> </p> </li> 
     <li class="card"> <a href="#"> <img src="https://www.java2s.com/style/demo/Opera.png"> </a> <p class="castname"> <a href="#">Lorem ipsu</a> </p> </li> 
     <li class="card"> <a href="#"> <img src="https://www.java2s.com/style/demo/Firefox.png"> </a> <p class="castname"> <a href="#">Lorem ipsu</a> </p> </li> 
     <li class="card"> <a href="#"> <img src="https://www.java2s.com/style/demo/Firefox.png"> </a> <p class="castname"> <a href="#">Lorem ipsu</a> </p> </li> 
     <li class="card"> <a href="#"> <img src="https://www.java2s.com/style/demo/InternetExplorer.png"> </a> <p class="castname"> <a href="#">Lorem ipsu</a> </p> </li> 
    </ol> 
   </section> 
  </div>  
 </body>
</html>

Related Tutorials