Wrapping Text in flexbox grid - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Flex Wrap

Description

Wrapping Text in flexbox grid

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">

div.Box--column > div:last-child {
   border: 2px dashed red;
}
.Box {<!-- ww  w .  ja  v  a 2 s  .  c  o  m-->
   box-sizing: border-box;
   position: relative;
   border: 0 solid black;
   margin: 0;
   padding: 0;
   align-items: stretch;
   justify-content: flex-start;
   flex-shrink: 0;
   display: flex;
}
.Box--row {
   flex-direction: row;
}
.Box--column {
   flex-direction: column;
}


      </style> 
 </head> 
 <body> 
  <div class="Box Box--row" style="width: 20em; border: 1px solid black"> 
   <div class="Box Box--column">
     Avatar 
   </div> 
   <div class="Box Box--column"> 
    <div class="Box Box--row"> 
     <div class="Box">
       Name 
     </div> 
     <div class="Box">
       6:30pm 
     </div> 
    </div> 
    <div style="width: 50%;">
      This is some text. This is some text. This is some text. This is some text. This is some text. 
    </div> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials