title: Elements collapsing when I change their height to percentage values
body: <p>I am working on my second project for the web (self taught) and I have a newbie question.</p>
  
  <p>I have a mock up header and footer in my page which have both a height of 100px. I am trying to change this so that the height is in percentages but when I do so they collapse. Why?</p>
  
  <p>Code:</p>
  
  <p>HTML</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en-US"&gt;
      &lt;head&gt;
          &lt;meta charset="UTF-8"&gt;
          &lt;title&gt;Photography&lt;/title&gt;
          &lt;link rel="stylesheet" type="text/css" href="styles.css"&gt;
          &lt;script type="text/javascript" src="jquery-3.1.0.min.js"&gt;&lt;/script&gt;
          &lt;script type="text/javascript" src="JavaScript2b.js"&gt;&lt;/script&gt;
          &lt;script type="text/javascript" src="JavaScript2.js"&gt;&lt;/script&gt;
      &lt;/head&gt;
  
      &lt;body&gt;
          &lt;div id="header"&gt;
          &lt;/div&gt;
          &lt;div id="wrap"&gt;
              &lt;div id="container"&gt;
                  &lt;div id="controllers"&gt;
                      &lt;div id="previous" class="buttons" onclick="change(-1);"&gt;
                      &lt;/div&gt;
                      &lt;div id="next" class="buttons" onclick="change(1);"&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div id="imagewrap"&gt;
                      &lt;img src="Images/01PARANA/Image1.jpg" height="100%" id="front" /&gt;
                  &lt;/div&gt;
                  &lt;div&gt;
                      &lt;p id="tag"&gt;Poem&lt;/p&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div id="footer"&gt;
          &lt;/div&gt;
      &lt;/body&gt;
      &lt;script type="text/javascript" src="JavaScript2.js"&gt;&lt;/script&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>CSS</p>
  
  <pre class="lang-css prettyprint-override"><code>@font-face {font-family: Eagle-Light;
                      src: url("Eagle-Light.otf") format("opentype");
                      }
  
  @font-face {font-family: Raleway Light;
                      src: url("Raleway Light.otf") format("opentype");
                      }
  
  body {
      margin: 0px;
      padding: 0px;
      height: 100%;
  }
  
  #header {
      position: relative;
      height: 100px;
      width: 100%;
      background-color: yellow;
  }
  
  #wrap {
      position: relative;
      clear: both;
      padding: 0px;
      width: 100%;
  }
  
  #footer {
      position: relative;
      height: 100px;
      width: 100%;
      background-color: lightgray;
      display: block;
  }
  
  #container {
      position: relative;
      margin: 15px auto;
  }
  
  #controllers {
      position: static;
      height: 20px;
  }
  
  #previous {
      position: absolute;
      left: 10px;
      background-image: url(Images/carremoins.png);
      background-repeat: no-repeat;
      background-position: center center;
      width: 20px;
      height: 20px;
      z-index: 4;
  
  }
  
  #next {
      background-image: url(Images/carreplus.png);
      background-repeat: no-repeat;
      width: 20px;
      height: 20px;
      position: absolute;
      right: 10px;
      z-index: 4;
      background-position: center center;
  }
  
  #container:hover .buttons {
  /*  display: block;*/
  opacity: 1;
  }
  
  #tag {
      position: relative;
      height: 40px;
      line-height: 1.7em;
      padding-top: 5px;
      text-align: center;
      font-size: 1.1em;
  }
  
  
  .buttons {
      cursor: pointer;
      top: 50%;
      z-index: 3;
  /*  display: none;*/
      opacity: 0;
      transition: opacity .3s ease-in-out;
  }
  
  
  #imagewrap{
      position: relative;
      border: 1px solid #818181;
      overflow: hidden;
      z-index: 2;
      height: 100vh;
  }
  
  #front {
      display: block;
  }
  
  p {
      color: #818181;
      font-family: Eagle-Light;
      line-height: 1.7em;
      padding: 0px;
      margin: 0px;
      font-size: 0.5em;
      letter-spacing: 0.21em;
  }
  
  
  a:link {
      text-decoration: none;
      color: inherit;
  }
  
  a:visited {
      text-decoration: none;
      color: inherit;
  }
  </code></pre>