Responsive image and List items - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Responsive Layout

Description

Responsive image and List items

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">
.container {<!-- w w  w. j a  v  a2  s.c o  m-->
   height:201px;
}

.navigation {
   float:left;
   width:201px;
   height:100%;
}

.list {
   padding:0;
   margin:0;
   height:100%;
}

.list li {
   margin:0;
   padding:0;
   margin-right:6px;
   margin-bottom:3%;
   height:24.6%;
}

.list li:last-child {
   margin-right:6px;
   margin-bottom:0;
   height:24.6%;
}

.list li a {
   display:block;
   background:grey;
   line-height:100%;
   height:100%;
}

.image {
   float:left;
}
</style> 
 </head> 
 <body> 
  <div class="container"> 
   <div class="navigation"> 
    <ul class="list"> 
     <li> <a href="">Lorem ips</a> </li> 
     <li> <a href="">Lorem ips</a> </li> 
     <li> <a href="">Lorem ips</a> </li> 
     <li> <a href="">Lorem ips</a> </li> 
    </ul> 
   </div> 
   <div class="image"> 
    <img src="https://www.java2s.com/style/demo/Firefox.png" width="100%"> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials