Positioning two horizontal divs in a dynamic way - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:2 Column

Description

Positioning two horizontal divs in a dynamic way

Demo Code

ResultView the demo in separate window

<html lang="en">
 <head> 
  <style>
body {<!--from   w w w . j  av a 2s.  co m-->
   background:black;
   color:Chartreuse;
}

#outer {
   display:flex;
   flex-direction:column;
}

html, body , #outer {
   height:100%;
   margin:0;
}

#a {
   overflow:auto;
}

#b {
   background:blue;
   min-height:201px;
}
</style> 
 </head> 
 <body translate="no"> 
  <div id="outer"> 
   <div id="a">
     Lorem 
    <br>Lorem 
    <br>Lorem 
    <br>Lorem 
    <br>Lorem 
    <br>Lorem 
    <br>Lorem 
    <br>Lorem 
    <br>Lorem 
    <br>Lorem 
    <br>Lorem 
    <br>Lorem 
    <br>Lorem 
    <br> 
   </div> 
   <div id="b"></div> 
  </div>  
 </body>
</html>

Related Tutorials