Create a three column layout with responsive width for the middle column - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:3 Column

Description

Create a three column layout with responsive width for the middle column

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">
.parent {<!--   w w w .ja v a  2s.c o m-->
   display:flex;
   width:100%;
}

.item {
   border:2px solid Chartreuse;
   height:100px;
}

.a {
   width:86px;
}

.b {
   flex:2 auto;
}
</style> 
 </head> 
 <body> 
  <div class="parent"> 
   <div class="item a"></div> 
   <div class="item b"></div> 
   <div class="item c">
     test 
   </div> 
  </div> 
  <div class="parent"> 
   <div class="item a"></div> 
   <div class="item b"></div> 
   <div class="item c">
     test 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials