JSFiddle - React, Tailwind, and code Playground

by Soviut

HTML

<div class="container">
    <div class="image">
        <div class="content">
            <div class="copy">
                <p>This is some text that is going to wrap because it is very long and blah blah blah</p>
            </div>
        </div>
    </div>
</div>

CSS

.container {
    width: 30%;
    margin: 0 auto;
}

.image {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 135%; /* because ratio is 0.75 and 200 - 75 is 135 */
    box-sizing: border-box;

    background: url(http://www.untiredwithloving.org/palm_tree_2.jpg) top left no-repeat;
    background-size: cover;
    color: white;
}

.content {
    position: absolute;
    display: table;
    top: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    
    background: red;
}

.copy {
    display: table-cell;
    
    vertical-align: middle;
}