CSS for HTML dynamic layout with fixed columns - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Column Layout

Description

CSS for HTML dynamic layout with fixed columns

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">

html, body {
   height: 100%;
}
.table {<!--from  w w  w .ja va2s  . c  o  m-->
   display: table;
   width: 100%;
   height: 100%;
}
.cell {
   height: 100%;
   display: table-cell;
}
.cell:first-child {
   width: 1px;
   background: #ff0000;
}
.cell:last-child {
   background: #0000ff;
}
.inner {
   width: 100px;
}


      </style> 
 </head> 
 <body> 
  <div class="table"> 
   <div class="cell"> 
    <div class="inner"></div> 
   </div> 
   <div class="cell"></div> 
  </div>  
 </body>
</html>

Related Tutorials