Make flexbox divs wrap content vertically - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Flex Wrap

Description

Make flexbox divs wrap content vertically

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
 </head> <!-- w ww. ja va 2 s .  co  m-->
 <body> 
  <div style="display: flex; flex-direction: row; align-items:flex-start;"> 
   <div style="flex:1; border: 1px solid #ccc;">
     1 
    <br> A 
    <br> B 
    <br> C 
    <br> D 
    <br> E 
   </div> 
   <div style="flex:1; border: 1px solid #ccc;">
     2 
   </div> 
   <div style="flex:1; border: 1px solid #ccc;">
     3 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials