From 0bd29fdf4fb78d1f691942ef5f136958b0facea9 Mon Sep 17 00:00:00 2001 From: Luca Date: Sun, 12 Mar 2023 20:34:30 +0100 Subject: [PATCH] Make main menu stick to top --- assets/style.scss | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/assets/style.scss b/assets/style.scss index 2de262b..8ee4d08 100644 --- a/assets/style.scss +++ b/assets/style.scss @@ -31,15 +31,18 @@ body { } header, footer { - padding: 0 1rem; + padding: 1rem; } header { align-items: center; + background: $color-background; display: flex; flex-wrap: wrap; justify-content: space-between; - margin-top: 1rem; + position: sticky; + top: 0; + z-index: 1; a img { display: block; @@ -89,7 +92,7 @@ header { } main { - padding: 1rem; + padding: 0 1rem; & > :last-child { margin-bottom: 0 !important; @@ -100,16 +103,12 @@ main { } } -footer { - margin-bottom: 1rem; +footer nav { + align-items: end; - nav { - align-items: end; - - @media screen and (min-width: $small) { - align-items: normal; - justify-content: end; - } + @media screen and (min-width: $small) { + align-items: normal; + justify-content: end; } }