make a responsive grid of photos using Twitter Bootstrap if heights are different - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Responsive Layout

Description

make a responsive grid of photos using Twitter Bootstrap if heights are different

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">
.grid-wrapper {<!--   w w  w  .  j av  a2s  . co m-->
   width:100px;
   height:100px;
   overflow:hidden;
}

.grid-content img {
   max-height:100px;
   width:auto;
}
</style> 
 </head> 
 <body> 
  <div class="grid-wrapper"> 
   <div class="grid-content"> 
    <img src="https://www.java2s.com/style/demo/Google-Chrome.png"> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials