height 100% code example
Example 1: css 100% -20px
width: calc(100% -150px);
width: -moz-calc(100% - 150px);
width: -webkit-calc(100% - 150px);
Example 2: css window height
div {
height: 100vh;
}
Example 3: css 100% height
<!DOCTYPE html>
<html>
<head>
<title>100% height</title>
<style>
html,
body {
height: 100%;
margin: 0;
}
.container {
height: 100%;
background: #000;
}
</style>
</head>
<body>
<div class="container"></div>
</body>
</html>
Example 4: css window height
.left {
height: 100vh;
width: 50%;
background-color: grey;
float: left;
}
.right {
height: 100vh;
width: 50%;
background-color: red;
float: right;
}