Responsive image max height 100% - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Responsive Layout

Description

Responsive image max height 100%

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">
body, html {
   height:100%;
   margin:0;
   padding:0;
}

#content {<!--  w ww . j  a va2  s .com-->
   height:100%;
   padding:51px;
   box-sizing:border-box;
}

#content img {
   max-height:100%;
   max-width:100%;
}
</style> 
 </head> 
 <body> 
  <div id="content"> 
   <img src="https://www.java2s.com/style/demo/Opera.png"> 
  </div> 
  <script type="text/javascript">

      </script>  
 </body>
</html>

Related Tutorials