[Vuejs]-Flex-Wrap: Equal (Max-)Width for elements wrapped by column

0👍

You can follow the below code for equal width of column and text wrapping inside the column.

#main {
  width: 200px;
  border: 1px solid #c3c3c3;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}

#main div {
  height: 50px;
  width:50%;
}
 <div id="main">
  <div style="background-color:coral;">Very very long Text</div>
  <div style="background-color:lightblue;">Long Text</div>
  <div style="background-color:khaki;">C</div>
  <div style="background-color:pink;">D</div>
  <div style="background-color:lightgrey;">Also a very, very long Text</div>
  <div style="background-color:lightgreen;">F</div>
</div>

Leave a comment