I am trying to create text boxes to display reviews on a website. Each review is in a box, these boxes will be different heights depending in the amount of text per box. The image below is how I want it to be displayed on the website, the black boxes represents a review box.
However, I can't seem to find a way to display the text boxes like this without them all being stretched to the same size by using the flex attribute, or starting a new row based off the largest text box in the column.
The example code i have currently is:
.container-reviews {
width: 100%;
justify-content: space-between;
}
.box {
width: 24%;
background-color: black;
color: white;
float: left;
}
<div class="container">
<div class="box">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam</div>
<div class="box">Lorem ipsum dolor sit amet, consectetur adipiscing elit</div>
<div class="box">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua</div>
<div class="box">Lorem ipsum dolor sit amet</div>
<div class="box">Lorem ipsum dolor sit amet, consectetur adipiscing elit</div>
<div class="box">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam</div>
<div class="box">Lorem ipsum dolor sit amet</div>
<div class="box">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua</div>
</div>
Does anyone know how i can change my code to make the box div align like the image above?