From 318bf3032f73fc6881249543eef882a7b409115d Mon Sep 17 00:00:00 2001 From: Felix Hennig Date: Tue, 14 Nov 2023 15:34:23 +0100 Subject: [PATCH] got a working version --- src/css/header.css | 7 +++++-- src/css/vars.css | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/css/header.css b/src/css/header.css index f9588e2..ebfd3bd 100644 --- a/src/css/header.css +++ b/src/css/header.css @@ -176,11 +176,14 @@ body { .navbar-sub { display: block; - position: relative; background-color: var(--color-brand-primary); padding: 5px 15px 5px 0; transition: all 0.5s; - height: 42px; + height: var(--navbar-sub-height); + position: fixed; + top: var(--navbar-height); + width: 100%; + z-index: var(--z-index-navbar); /* overflow: hidden; */ } diff --git a/src/css/vars.css b/src/css/vars.css index 1d6d6ed..aedb854 100644 --- a/src/css/vars.css +++ b/src/css/vars.css @@ -121,9 +121,10 @@ --footer-link-font-color: var(--color-smoke-70); /* dimensions and positioning */ --navbar-height: calc(73 / var(--rem-base) * 1rem); + --navbar-sub-height: calc(45 / var(--rem-base) * 1rem); --toolbar-height: calc(45 / var(--rem-base) * 1rem); --drawer-height: var(--toolbar-height); - --body-top: var(--navbar-height); + --body-top: calc(var(--navbar-height) + var(--navbar-sub-height)); --body-min-height: calc(100vh - var(--body-top)); --nav-height: calc(var(--body-min-height) - var(--toolbar-height)); --nav-height--desktop: var(--body-min-height);