Overflow-x on image list - HTML CSS CSS Property

HTML CSS examples for CSS Property:overflow-x

Description

Overflow-x on image 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">
.testimg {<!--  w ww . jav a  2s  .  c  o  m-->
   height:100%;
   width:100%;
}

#testDiv {
   width:401px;
   overflow-x:auto;
   border:2px solid Chartreuse;
   white-space:nowrap;
   font-size:0;
}

.testimgdiv {
   width:121px;
   height:100px;
   display:inline-block;
}
</style> 
 </head> 
 <body> 
  <div id="testDiv"> 
   <div class="testimgdiv"> 
    <img class="testimg" src="https://www.java2s.com/style/demo/InternetExplorer.png"> 
   </div> 
   <div class="testimgdiv"> 
    <img class="testimg" src="https://www.java2s.com/style/demo/Firefox.png"> 
   </div> 
   <div class="testimgdiv"> 
    <img class="testimg" src="https://www.java2s.com/style/demo/InternetExplorer.png"> 
   </div> 
   <div class="testimgdiv"> 
    <img class="testimg" src="https://www.java2s.com/style/demo/InternetExplorer.png"> 
   </div> 
   <div class="testimgdiv"> 
    <img class="testimg" src="https://www.java2s.com/style/demo/Firefox.png"> 
   </div> 
   <div class="testimgdiv"> 
    <img class="testimg" src="https://www.java2s.com/style/demo/Opera.png"> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials