Zack Zack - 1 year ago 139
CSS Question

Make div take 100% of browser window height

Answer Source

If you want to achieve a 100 view height (device height) styling on a div or other elements you can use something like this:

.full-height {
  height: 100vh;
}
.full-width {
  width: 100vw;
}
div {
  background: green;
}
<div class="full-height full-width"></div>

This sets the element size using viewport units, where 1 vh is 1% of the viewport's height and 1 vw is 1% of the viewport's width. You can also see an example here: http://adtime.at/projects/github/bearded-cyril/ you can see there that I used this to assign 100vh to the aside on the left left side.

Maybe this is relevant for you: http://caniuse.com/#search=vh

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download