2

How do you make items in a flexbox the same height always? Currently, I can only get it to make height uniform in the same row, but the next row might be taller or shorter. Is there any way to correct this and make every row the same height?

main {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
}
div {
  width: 33%;
  background-color: lightblue;
  margin-bottom: 10px;
}
p {
  line-height: 50px;
}
<main>
  <div><p>Random text that may or may not be the same everywhere</p></div>
  <div><p>Random text that may or may not be the same everywhere and making some of these divs taller then others</p></div>
  <div><p>Random text that may or may not be the same everywhere</p></div>
  <div><p>Random text that may or may not be the same everywhere</p></div>
  <div><p>Random text that may or may not be the same everywhere</p></div>
  <div><p>Random text that may or may not be the same everywhere</p></div>  
</main>
Ricky Ruiz
  • 25,455
  • 6
  • 44
  • 53
amflare
  • 4,020
  • 3
  • 25
  • 44

0 Answers0