JSFiddle - React, Tailwind, and code Playground

HTML

<div class="popup">Some unknown sized content
    <br />
    <img src="http://placekitten.com/200/200" />
</div>

CSS

.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    border: 1px solid black;
}