Last active
October 1, 2020 12:22
-
-
Save ThomasKientz/3daf0807cb20e0809959bee8075e7fea to your computer and use it in GitHub Desktop.
A stacked layout using flex with a fixed header, a scrollable content and a fixed footer.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<body style="margin: 0"> | |
<div style="min-height: 100vh; display: flex; flex-direction: column"> | |
<div style="background-color: darkcyan">Header</div> | |
<div style="flex: 1 1 0px; overflow: auto"> | |
<div style="height: 20000px">Scrollable content</div> | |
</div> | |
<div style="background-color: red">Footer</div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment