Two column layout with one column having fixed width while other column has dynamic width - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:2 Column

Description

Two column layout with one column having fixed width while other column has dynamic width

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

* {<!--   w  w  w  .ja  va  2s . co  m-->
   margin: 0;
   padding: 0;
}
html, body, .container,
.container > .sidebar,
.container > .contentWrapper,
.container > .contentWrapper > .content {
   height: 100%;
}
.container > .sidebar {
   width: 200px;
   background-color: red;
   float: left;
}
.container > .contentWrapper {
   overflow: hidden;
}
.container .content {
   float: left;
   width: 100%;
   background-color: orange;
}


      </style> 
 </head> 
 <body> 
  <div class="container"> 
   <div class="sidebar"></div> 
   <div class="contentWrapper"> 
    <div class="content">
      Content... 
    </div> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials