Flexbox with fixed header and footer and scrollable content
You can do something like this: html, body { margin: 0; height: 100%; /* can also use viewport units (height: 100vh) */ } #container { display: flex; /* displays flex-items (children) inline */ flex-direction: column; /* stacks them vertically */ height: 100%; /* needs to take the parents height, alternative: body {display: flex} */ } … Read more