dum3ng / study-issues

0 stars 0 forks source link

100% height inner div #4

Open dum3ng opened 5 years ago

dum3ng commented 5 years ago

In many cases we want a 100% height div of outer container:

.h-100 {
 height: 100%;
}

The below example works on some operation system, but not on linux:

<body>
  <div class="main">
    <div class="container">
    </div>
  </div>
</body>
body {
  height: 100vh;
  display: flex;
  flex-direction: column;
}
.main {
  flex: 1 0 0;
}
.container {
  background: color;
  height: 100%;
}