Create a three columns layout using divs with two fluid on the side and fixed and centered middle content - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:3 Column

Description

Create a three columns layout using divs with two fluid on the side and fixed and centered middle content

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">
.header {<!--from   w  w w.ja v  a2s  . c o  m-->
   display:table;
   width:100%;
   height:121px;
   text-align:center;
}

.header>div {
   display:table-cell;
   vertical-align:middle;
}

.col {
   width:21%;
}

.custom-width {
   min-width:301px;
   background:pink;
}
</style> 
 </head> 
 <body> 
  <div class="header container"> 
   <div class="col col-1">
     COL 1 
   </div> 
   <div class="col col-2 custom-width">
     COL 2 
   </div> 
   <div class="col col-3">
     COL 3 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials