Make flex item take 100% width of new line - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Flex Width

Description

Make flex item take 100% width of new line

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

.container {<!--   w  ww.j a v a  2 s. c om-->
   display: flex;
   justify-content: flex-end;
   position: relative;
   flex-wrap: wrap;
}
.btn-1,
.btn-2,
.btn-3 {
   width: 40px;
   height: 40px;
}
.btn-1 {
   background: red;
   margin-right: auto;
}
.btn-2 {
   background: blue;
}
.btn-3 {
   background: orange;
}
.text {
   width: 100%;
}


      </style> 
 </head> 
 <body> 
  <div class="container"> 
   <div class="btn-1"></div> 
   <div class="btn-2"></div> 
   <div class="btn-3"></div> 
   <div class="text">
     Lorem ipsum dolor sit amet, consectetur adipisicing elit. A veritatis harum illum assumenda odio ut, quos, ipsam molestias et sint nemo, saepe! Soluta a, quasi sequi, ut corrupti eius molestias. 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials