JSFiddle - React, Tailwind, and code Playground
by jamesclebio
HTML
<main>
<div>
Eu sou um elemento block de largura e altura desconhecidos, centralizado verticalmente em meu elemento pai.
</div>
</main>
CSS
body {
background: #0C2939;
font-size: 80%;
padding: 20px;
}
main {
background: white;
height: 200px;
width: 60%;
margin: 0 auto;
padding: 20px;
display: flex;
justify-content: center;
align-items: center;
resize: both;
overflow: auto;
}
main div {
background: black;
color: white;
width: 50%;
padding: 20px;
resize: both;
overflow: auto;
}