From 0ce3536116e2d6c899f942d788b6fa214df5d2c8 Mon Sep 17 00:00:00 2001 From: Kev Date: Mon, 8 Mar 2021 08:14:32 +0000 Subject: [PATCH] Added flex to body and main so footer sticks to bottom on smaller pages. --- simple.css | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/simple.css b/simple.css index 94c6d42..e2d1b03 100644 --- a/simple.css +++ b/simple.css @@ -61,6 +61,9 @@ body { font-size: var(--base-fontsize); line-height: var(--line-height); margin: 0; + display: flex; + min-height: 100vh; + flex-direction: column; } /* Make the main element a nice central block */ @@ -68,6 +71,7 @@ main { margin: 1rem auto 0; max-width: 45rem; padding: 0 .5rem; + flex: 1; } /* Make the header bg full width, but the content inline with body */ @@ -322,7 +326,7 @@ select { linear-gradient(45deg, transparent 49%, var(--text) 51%), linear-gradient(135deg, var(--text) 51%, transparent 49%); background-position: - calc(100% - 20px), + calc(100% - 20px), calc(100% - 15px); background-size: 5px 5px,