From 6cceade2da5425a2a1c46ac032263c961e81affb Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Tue, 12 Aug 2025 08:41:09 +0800 Subject: Sticky footer --- forged/static/style.css | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'forged/static') diff --git a/forged/static/style.css b/forged/static/style.css index 51846a2..13a2c8e 100644 --- a/forged/static/style.css +++ b/forged/static/style.css @@ -86,10 +86,8 @@ html, code, pre { /* Footer styles */ footer { - margin-top: 1rem; margin-left: auto; margin-right: auto; - margin-bottom: 1rem; display: block; padding: 0 5px; width: fit-content; @@ -104,6 +102,21 @@ footer a:link, footer a:visited { padding: 0 1rem; } +/* Sticky footer */ +body { + position: relative; + min-height: 100vh; +} +main { + padding-bottom: 2.5rem; +} +footer { + position: absolute; + bottom: 0; + width: 100%; + height: 2rem; +} + /* Link styles */ a:link, a:visited { text-decoration-color: var(--text-decoration-color); -- cgit v1.2.3