Sizing a child to 100% height of parent element

author's avatar
Kees de Kooter
May 25 8:44
  1. make sure the body is sized to the max
    html, body {
     height: 100vh;
    }
  2. size the child (and all intermediate elements) to 100%
    .the-child {
     display: flex;
     height: 100%;
    }