Answers for "flex child go to next line"

4

flexbox go to next row

.container {
  display: flex;
  flex-flow: row wrap;  
  justify-content: space-around;
}
Posted by: Guest on January-06-2022
1

break to a new line flexbox

<div class="container">
  <div class="item"></div>
  <div class="break"></div> <!-- break -->
  <div class="item"></div>
</div>

<style>
  /* Inserting this collapsed row between two flex items will make 
     the flex item that comes after it break to a new row */
  .break {
	flex-basis: 100%;
	height: 0;
  }
</style>
Posted by: Guest on May-23-2021

Browse Popular Code Answers by Language