JSFiddle - React, Tailwind, and code Playground

by Marius Jopen

HTML

<div class="container">

  <div class="post">
    <div class="image">
      <img src="https://dummyimage.com/200x100/000/fff">
    </div>
    <div class="text">
      Short text
    </div>
  </div>

  <div class="post">
    <div class="image">
      <img src="https://dummyimage.com/200x200/000/fff">
    </div>
    <div class="text">
      Short text
    </div>
  </div>
  
  <div class="post">
    <div class="image">
      <img src="https://dummyimage.com/200x200/000/fff">
    </div>
    <div class="text">
      Long Text Long Text Long Text Long Text Long Text Long Text Long Text Long Text Long Text
    </div>
  </div>
  
  
  
  <div class="post">
    <div class="image">
      <img src="https://dummyimage.com/200x100/000/fff">
    </div>
    <div class="text">
      Short text
    </div>
  </div>

  <div class="post">
    <div class="image">
      <img src="https://dummyimage.com/200x200/000/fff">
    </div>
    <div class="text">
      Short text
    </div>
  </div>
  
  <div class="post">
    <div class="image">
      <img src="https://dummyimage.com/200x100/000/fff">
    </div>
    <div class="text">
      Long Text Long Text Long Text Long Text Long Text Long Text Long Text Long Text Long Text
    </div>
  </div>
  
</div>

CSS

* {
  margin: 0px;
}

.container {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
}

.post {
  width: 33%;
  margin-bottom: 50px;
}

.image {
  background-color: red;
  height: 220px;
  display: flex;
  justify-content: bottom;
  flex-flow: column;
}

img {
  width: 100%;
  height: auto;
}

.text {
    background-color: yellow;
}