Wrap columns in a flex box - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Flex Column

Description

Wrap columns in a flex box

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%;
   margin:0px;
   padding:0px
}

.main {<!-- w  ww  .j a va2s.c  o m-->
   height:100%;
   max-heigth:100%;
   display:flex;
   flex-direction:column;
   background-color:Chartreuse;
   color:yellow;
}

.wrapper {
   height:100%;
   display:flex;
   background-color:blue;
}

.left {
   width:51px;
   background-color:pink;
}

.content {
   flex:2;
   display:flex;
   flex-flow:column wrap;
}
</style> 
 </head> 
 <body> 
  <div class="main"> 
   <div class="top"> 
    <div class="title">
      Title 
    </div> 
   </div> 
   <div class="wrapper"> 
    <div class="left"> 
     <div class="link">
       Link 
     </div> 
    </div> 
    <div class="content"> 
     <div class="item">
       Item1 
     </div> 
     <div class="item">
       Item2 
     </div> 
     <div class="item">
       Item3 
     </div> 
     <div class="item">
       Item4 
     </div> 
     <div class="item">
       Item5 
     </div> 
     <div class="item">
       Item6 
     </div> 
     <div class="item">
       Item7 
     </div> 
     <div class="item">
       Item8 
     </div> 
     <div class="item">
       Item9 
     </div> 
     <div class="item">
       Item10 
     </div> 
     <div class="item">
       Item11 
     </div> 
     <div class="item">
       Item12 
     </div> 
     <div class="item">
       Item13 
     </div> 
     <div class="item">
       Item14 
     </div> 
     <div class="item">
       Item15 
     </div> 
     <div class="item">
       Item16 
     </div> 
     <div class="item">
       Item17 
     </div> 
     <div class="item">
       Item18 
     </div> 
     <div class="item">
       Item19 
     </div> 
    </div> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials