JSFiddle - React, Tailwind, and code Playground

by Krishna Ananthi

HTML

<div id="parent">
  <div id="child">Hello World!</div>
</div>

CSS

#parent {
  background: yellow; 
 /* display:grid;
  place-items: center;*/
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:100vh;
  width:100%;
}

#child {
  width: 100px;
  height: 100px;
  background: silver;
/*  top:50%;
  left:50%;
  position:absolute;
  transform:translate(-50%,-50%);*/
}