Set wrapping priority between primary and nested flexbox - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Flex Wrap

Description

Set wrapping priority between primary and nested flexbox

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

.m {<!--from w  w w  .  j  av a 2  s  .c om-->
   display: flex;
   flex-wrap: wrap;
}
.l_1 {
   background-color: red;
   flex: 1;
   padding: 15px;
   margin-left: auto;
   margin-right: auto;
}
.r_1 {
   background-color: yellow;
   flex: 1;
   padding: 25px;
   margin-left: auto;
   margin-right: auto;
}
.b_1 {
   padding: 15px;
   border-radius: 4px;
}
.b_row {
   display: flex;
   width: 100%;
}
.b_item {
   flex: 1;
}
@media ( max-width: 300px ) {
   .b_row { flex-wrap: wrap; }
}


      </style> 
 </head> 
 <body> 
  <div class="m"> 
   <div class="l_1"> 
    <div class="b_1">
      Left text 
     <div class="b_row"> 
      <div class="b_item">
        Item 1 
       <br> 
       <input class="datepicker" type="text" size="10"> 
      </div> 
      <div class="b_item">
        Item 2 
       <br> 
       <input class="datepicker" type="text" size="10"> 
      </div> 
     </div> 
    </div> 
   </div> 
   <div class="r_1">
     Right Item 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials