JSFiddle - React, Tailwind, and code Playground

HTML

<div class="container">
  <div class="item">
    <a class="link" href="">link 1</a>
    <img class="img" src="http://placehold.it/100x130" alt="" />
  </div>
  <div class="item">
    <a class="link" href="">link 2</a>
    <img class="img" src="http://placehold.it/100x130" alt="" />
  </div>
  <div class="item">
    <a class="link" href="">link 3</a>
    <img class="img" src="http://placehold.it/100x130" alt="" />
  </div>
  <div class="item">
    <a class="link" href="">link 4</a>
    <img class="img" src="http://placehold.it/100x130" alt="" />
  </div>
</div>

CSS

.container, .item {
  display: flex;
}

.item {
  flex-direction: column;
  position: relative;
}

.item:before {
  content: '';
  border-top: 1px solid;
  position: absolute;
  width: 100%;
  top: 2em;
}

.item:first-child:before {
  left: 1.5em;
}

.item:last-child:before {
  left: -1.5em;
}

.item:last-child .link,
.item:last-child .img {
  border-right: none;
}

.link,
.img {
  border-right: 1px solid;  
}

.link {
  text-align: center;
}

.img {
  margin-top: 2em;
  padding: 0.5em 1em 0.5em;
}