JSFiddle - React, Tailwind, and code Playground
by Rachit Garg
HTML
<div class="center-my-content"><img src="http://www.harpseals.org/images/seals/whitecoat_on_back-photo-eric_baccega_npl-sm.jpg"/></div>
CSS
body{
height:500px;
width:500px;
}
.center-my-content {
height:80%;
width:80%;
position:relative;
border:1px solid #000;
margin:0 auto;
}
img{position:absolute;top:0;left:0;right:0;bottom:0;margin:auto;}