JSFiddle - React, Tailwind, and code Playground

HTML

<div class="container">
    <img src="http://lorempixel.com/400/200/"/>
    <div class="text"><div class="text2"><div class="text3">this is some text this is some text</div></div></div>
</div>

CSS

* {
    box-sizing: border-box;
}
.container {
    width: 100%;
    text-align: center;
    border: 1px solid red;
    display: inline-block;
    position: relative;
}

img {
    float: left;
}

.text {
    border: 1px solid blue;
    display: inline-block;
    vertical-align: middle;
    height: 100%;
    width: 100%;
    position: absolute;
    left: 0px;
}

.text2 {
    display: table;
    height: 100%;
    width: 100%;
    border: 1px dashed black;
}

.text3 {
    display: table-cell;
    vertical-align: middle;
    border: 1px dotted green;
}