JSFiddle - React, Tailwind, and code Playground

by Ryan J

HTML

<ul class="photo-tiles clearfix">
  <li class="photo-tile"> <img class="photo-image" src="http://i.imgur.com/jKfD0Pg.jpg" alt=">Mr Beans Harnworth">
    <div class="photo-overlay">
      <div class="photo-content">
        <p><strong>Fun Fact:</strong>
          <br> I was ejected during the 1992 American League Championship Series game for trying to catch a ball that was still in play. Thankfully, the Jays still went on to win the game - and the World Series!</p>
      </div>
    </div>
    <h3 class="name">Mr Beans Harnworth</h3>
    <p class="title">Owner of ShippingCo</p>
    <p class="phone">Tel: +567-222-3333</p>
  </li>
</ul>

CSS

.photo-tiles {
  list-style: none;
  margin: 0 -2px;
  position: relative;
  width: 100%;
}

.photo-tiles,
.photo-tile,
.photo-content {
  box-sizing: border-box;
}

.photo-tile {
  float: left;
  margin-bottom: 4px;
  padding: 0 2px;
  position: relative;
  width: 25%;
}

*:first-child+html .photo-tile {
  width: 24.3%;
}

.photo-image {
  height: auto;
  max-width: 100%;
}

.photo-overlay {
  background: transparent;
  background: rgba(0, 37, 75, 0);
  display: block;
  height: 100%;
  left: 2px;
  opacity: 0;
  position: absolute;
  right: 2px;
  text-decoration: none;
  top: 0;
  transition: background 0.5s 0.5s, opacity 0.5s 0.5s;
}

.photo-tile:hover .photo-overlay {
  background: url(http://i.imgur.com/cSpShL0.png) repeat;
  background: rgba(0, 37, 75, 0.8);
  opacity: 1;
  transition: background 0.2s 0s, opacity 0.2s 0s;
}

.photo-content {
  bottom: 0;
  color: #fff;
  height: auto;
  left: 0;
  padding: 6px;
  position: absolute;
  width: 100%;
}

.photo-content h3,
.photo-content p {
  line-height: 1.2em;
}

.photo-content h3 {
  color: #fff;
  font-size: 13px;
  margin: 0 0 8px;
}

.photo-content p {
  font-size: 11px;
  margin: 0 0 5px;
}

.name {
    margin: 8px 0px 0px 0px;
}

.title {
    font-size: 11px;
}

.phone {
    font-weight: bold;
}

.photo-overlay {
    height: 170px;
}