Responsive displaying image inside of percentage div - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Responsive Layout

Description

Responsive displaying image inside of percentage div

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">
div {<!--   w w w . j  av a 2  s  .c  o  m-->
   width:61%;
   height:401px;
}

div>img {
   width:100%;
   min-height:61px;
   min-width:61px;
   background:tomato
}
</style> 
 </head> 
 <body> 
  <div> 
   <img src="https://www.java2s.com/style/demo/Safari.png" alt=""> 
  </div>  
 </body>
</html>

Related Tutorials