JSFiddle - React, Tailwind, and code Playground

CSS

section {
    overflow: auto;
}

section figure {
    float: left;
    clear: both;
    
    position: relative;
    overflow: auto;
    
    margin: 0 auto;
    padding: 30px 0 0 0;
    font-size: 15px;
}

section figure img {
    vertical-align: bottom;
}

section figure figcaption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    
    background: rgba(0,0,0,0.7);
    text-align: center;
    color: #fff; 
    padding: 10px;
}




section {
    padding-bottom: 30px;
    background: #ccc;
        
}