JSFiddle - React, Tailwind, and code Playground
HTML
<main>
<div class="center">
Je suis un élément de type bloc et je suis centré.
</div>
</main>
CSS
body {
background: #3e58aa;
}
main {
background: white;
margin: 20px 0;
padding: 10px;
}
.center {
margin: 0 auto;
width: 200px;
background: #CCDCCD;
padding: 20px;
color: #3e58aa;
}