Create 2 column 100% layout with 1 fixed column and 1 dynamic column - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:2 Column

Description

Create 2 column 100% layout with 1 fixed column and 1 dynamic 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">
#container<!--from  w  w  w  . j  a  v  a2  s. c  om-->
 {
   width:100%;
   min-width:961px;
}

#nav
 {
   float:left;
   width:201px;
   height:100%;
   min-height:801px;
   border:2px solid Chartreuse;
}

#content
 {
   margin-left:206px;
   min-width:756px;
   height:100%;
   min-height:801px;
   border:2px solid yellow;
}

p
 {
   padding-bottom:2em;
}
</style> 
 </head> 
 <body> 
  <div id="container"> 
   <div id="nav"> 
    <ul> 
     <li>Home</li> 
     <li>Foo</li> 
    </ul> 
   </div> 
   <div id="content"> 
    <p>test</p> 
    <p>test</p> 
    <p>test</p> 
    <p>test</p> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials