1
I’m trying to scale the side menu and the content div between the header and the footer so that it occupies the entire screen, even if I don’t have much content. if you have a lot of content, you would have the scroll bar.
Like this:
How it should be (Photoshop):
Code:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<style>
html,body{
min-height: 100%;
}
header {
height: 100px;
background-color: blue;
}
.container {
background-color: aqua;
}
aside {
background-color: blueviolet;
height: 100%;
}
main {
background-color: gold;
height: 100%;
}
footer {
height: 150px;
background-color: red;
position: absolute;
bottom: 0;
width: 100%;
}
</style>
</head>
<body>
<header>
</header>
<div class="container">
<aside class="col-sm-3">
<h1>MENU</h1>
</aside>
<main class="col-sm-9">
<p>Conteudo</p>
<p>Conteudo</p>
<p>Conteudo</p>
<p>Conteudo</p>
<p>Conteudo</p>
<p>Conteudo</p>
<p>Conteudo</p>
<p>Conteudo</p>
</main>
</div>
<footer>
</footer>
</body>
</html>