JSFiddle - React, Tailwind, and code Playground
by Daniel Dubois
HTML
<div class="flex-center">
<p>Nous sommes plusieurs lignes centrées verticalement dans un container de type flex.</p>
</div>
CSS
body {
background: #3e58aa;
font-size: 80%;
}
div {
background: white;
width: 240px;
margin: 20px;
}
.flex-center {
background: #CCDCCD;
color: #3e58aa;
border: 10px solid white;
display: flex;
flex-direction: column;
justify-content: center;
height: 200px;
resize: vertical;
overflow: auto;
}
.flex-center p {
margin: 0;
padding: 20px;
}