Responsive website images the same height - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Responsive Layout

Description

Responsive website images the same height

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">
.w {<!--from  w w w.ja  v a 2s  .c om-->
   display:table-row;
}

.img {
   width:51%;
   display:table-cell;
}

.img img {
   min-height:501px;
   max-height:501px;
}

.img.o img {
   width:100%;
}
</style> 
 </head> 
 <body> 
  <div class="w"> 
   <div class="img"> 
    <img src="https://www.java2s.com/style/demo/InternetExplorer.png"> 
   </div> 
   <div class="img o"> 
    <img src="https://www.java2s.com/style/demo/InternetExplorer.png"> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials