JSFiddle - React, Tailwind, and code Playground by youssef moudine May 20, 2019 HTML <main> <!-- The Demo --> <figure> <!-- random image --> <img src="https://source.unsplash.com/random/300x300" /> <figcaption> <span class="title">Yo Pierre, you wanna come out here?</span> </figcaption> </figure> </main> CSS @import url("https://fonts.googleapis.com/css?family=Playfair+Display"); figure { position: relative; overflow: hidden; } img { vertical-align: middle; } figcaption { position: absolute; bottom: 0; left: 0; right: 0; background: #FAFAFA; padding: 10px 15px; margin: 0; background: linear-gradient(to bottom, #DED092, #FABF74); } main { display: flex; justify-content: center; align-items: center; width: 100%; height: 100%; background: #212121; }