From 9e7e354ab575947879f5e576234e2980064e58c9 Mon Sep 17 00:00:00 2001 From: Sarah Oberbichler <66369271+soberbichler@users.noreply.github.com> Date: Sun, 6 Oct 2024 00:06:37 +0200 Subject: [PATCH] Update styles.css --- styles.css | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/styles.css b/styles.css index 82eda00..aff2cde 100644 --- a/styles.css +++ b/styles.css @@ -24,6 +24,10 @@ header { text-align: center; padding: 1rem; width: 100%; + position: fixed; + top: 0; + left: 0; + z-index: 1000; } .logo svg { @@ -38,7 +42,7 @@ h1 { .content-wrapper { display: flex; - flex: 1; + margin-top: 150px; /* Adjust this value based on your header height */ } .sidebar { @@ -46,7 +50,7 @@ h1 { background-color: #f4f4f4; padding: 1rem; position: fixed; - top: 0; + top: 150px; /* Should match the margin-top of .content-wrapper */ bottom: 0; left: 0; overflow-y: auto; @@ -54,7 +58,6 @@ h1 { .sidebar h2 { color: #8B0000; - margin-top: 1rem; border-bottom: 2px solid #8B0000; padding-bottom: 0.5rem; margin-bottom: 1rem; @@ -122,10 +125,16 @@ footer { } @media (max-width: 800px) { + .content-wrapper { + flex-direction: column; + margin-top: 120px; /* Adjust for smaller header on mobile */ + } + .sidebar { width: 100%; position: static; margin-bottom: 1rem; + top: auto; } main { @@ -133,10 +142,6 @@ footer { width: 100%; } - .content-wrapper { - flex-direction: column; - } - h1 { font-size: 1.5em; }