Webdevelopment: Sizing a child to 100% height of parent element

Last update: 2/15/2021, 9:15:47 PM

  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%;
    }