Playing with height

by Arjun Singh

HTML

<div class="container">
  <div class="child">
    Hello World!
  </div>
</div>

CSS

*{
  box-sizing: border-box;
}
html, body{
  margin: 0;
  height: 100%;
  
  background-color: #eee;
  
  font-family: 'Roboto Condensed';
  font-size: 1.8rem;
}

.container{
  background-color: rebeccapurple;
  color: white;
  
  border: 4px solid white;
  box-shadow: 0 0 10px #ddd;
  
  padding: 16px;
  
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.child{
  width: 100%;
  text-align: center;
  background-color: tomato;
  color: black;
  
   border: 4px solid black;
  box-shadow: 0 0 10px #888;
  
  padding: 16px;
  
  height: 100%;
}