Skip to content

Instantly share code, notes, and snippets.

Avatar

Thomas Kientz ThomasKientz

View GitHub Profile
@ThomasKientz
ThomasKientz / flex-stacked-layout.html
Last active Oct 1, 2020
A stacked layout using flex with a fixed header, a scrollable content and a fixed footer.
View flex-stacked-layout.html
<!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>
You can’t perform that action at this time.