0

I'm trying to set up a simple page layout using flex but cannot seem to get it to work in IE11. The main component refuses to grow to fill the space like it does in Chrome or Safari. I've read everything I can find about flex-grow on IE but to no avail.

    html, body {
     width: 100vw;
     min-height: 100vh;
     margin: 0;
     padding: 0;
    }
    body {
     display: -ms-flexbox;
     display: -webkit-flex;
     display: flex;
     -webkit-flex-direction: column;
     flex-direction: column;
     background: black;
    }
    header {
     background: pink;
     height: 100px;
    }
    main {
     background: lightgrey;
     -webkit-flex: 1 0 auto;
     -ms-flex: 1 0 auto;
     flex: 1 0 auto;
     height: 100%;
    }
    footer {
     background: lightblue;
     -webkit-flex: 0 0 auto;
     -ms-flex: 0 0 auto;
     flex: 0 0 auto;
     height: 100px;
    }
<!DOCTYPE html>
<html>
<head>
 <title></title>
</head>
<body>
 <header class="navigation">
  <ul>
   <li>
    <a href="#"><span>Privacy</span></a>
   </li>
   <li>
    <a href="#"><span>Sitemap</span></a>
   </li>
   <li>
    <a href="#"><span>Newsletter</span></a>
   </li>
  </ul>
 </header>
 <main>
  The main Section
 </main>
 <footer>
  Footer
 </footer>
</body>
</html>
Paulie_D
  • 107,962
  • 13
  • 142
  • 161
S Chalk
  • 23
  • 2

1 Answers1

2

You need to give,

height:100%; for html and body

and need to remove

height: 100%  from main