title: Height of div not according to declaration in css
body: <p>I have a div <code>innerDetails</code> which is a flex item with code as specified below:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.cover{
      height: 100vh;
      width: 100%;
  }
  
  #screenContainer{
      display: flex;
      justify-content: center;
      align-items: center;
  }
  
  #screen{
      height: 90vh;
      width: 87vw;
      background-color: #eeeeee;
      border-radius: 2%;
      display: flex;
      justify-content: space-around;
      align-items: center;
  }
  
  #innerScreen{
      background-color: #060b22;
      height: 80vh;
      width: 80vw;
      padding: 15px;
  }
  
  #details{
      display: flex;
      justify-content: space-evenly;
      flex-wrap: wrap-reverse;
  }
  
  .innerDetails{
      height: 100%;
      width: 45%;
      font-size: 1.7vw;
      color: rgb(255, 117, 67);
      font-family: Arial, Helvetica, sans-serif;
      text-align: justify;
  }
  
  #backImage{
      background-image: url(https://placehold.it/250px250);
      background-size: cover;
      background-repeat: no-repeat;
      background-position: center;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="cover" id="screenContainer"&gt;
      &lt;div id="screen"&gt;
          &lt;div id="innerScreen"&gt;
              &lt;p class="heading" id="arr"&gt;&lt;/p&gt;
              &lt;div id="details"&gt;
                  &lt;div class="innerDetails"&gt;
                      &lt;p id="p1"&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi tincidunt ligula vel urna blandit, ut auctor dolor fermentum. Aenean ut augue tincidunt, bibendum nunc non, pulvinar nisl. Maecenas dapibus, ante vel tincidunt laoreet, sem ex finibus odio, sit amet ultricies ligula nunc a sem. Nam nulla velit, congue sit amet commodo interdum, consectetur sed nisi. Vivamus commodo dictum augue nec consectetur. Curabitur molestie viverra interdum. Nullam vel augue sed sem vulputate vulputate non id sapien. Aenean posuere egestas orci. Duis vitae suscipit ante, tempor tempor risus. Sed ut augue quis elit blandit maximus. Phasellus sit amet arcu et odio tristique malesuada&lt;/p&gt;
                  &lt;/div&gt;
                  &lt;div id="backImage" class="innerDetails"&gt;fdbd&lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>(Well, there is a lot of code but I thin without it, reproducing my problem would not be possible. Some values are in vh and vw so expand the results.)</p>
  <p>The problem is that the div's height is automatically decreasing from my specified height (100%) to 0%.</p>
  <p>I thought it is so because there is no content inside the div, just a background-image. So I added some padding to it but it didn't work.</p>
  <p>However, If I insert some text in the div, only that much part has the background image.</p>
  <p><a href="https://i.stack.imgur.com/3Z6tp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3Z6tp.png" alt="Current situation" /></a></p>