Create a three column layout with right most column wrapping under middle one if window is too narrow - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:3 Column

Description

Create a three column layout with right most column wrapping under middle one if window is too narrow

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%;
}

#left {
   height:100%;
   background-color:Chartreuse;
   width:201px;
   float:left;
}

#main-right {
   height:100%;
   margin-left:201px;
}

#main {<!-- ww  w  .ja v  a  2  s .c o  m-->
   min-width:301px;
   border:2px solid yellow;
   float:left;
}

#right {
   float:left;
   width:201px;
   border:2px solid blue;
}
</style> 
 </head> 
 <body> 
  <div id="left">
    left 
  </div> 
  <div id="main-right"> 
   <div id="main">
     middle main 
   </div> 
   <div id="right">
     right 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials