From 2d967c200cc8a3e28a3872f9729562730eef722e Mon Sep 17 00:00:00 2001 From: NOrtmann1 <145041949+NOrtmann1@users.noreply.github.com> Date: Tue, 26 May 2026 11:18:58 +0200 Subject: [PATCH] x-Button in der Sidebar --- css/navbar.css | 16 ++++++++++++++++ includes/navbar.php | 3 +++ 2 files changed, 19 insertions(+) diff --git a/css/navbar.css b/css/navbar.css index bbf026c..7255cb5 100644 --- a/css/navbar.css +++ b/css/navbar.css @@ -227,6 +227,10 @@ CSS für die navbar padding: 2rem 1rem; box-shadow: 2px 0 10px rgba(0,0,0,0.5); overflow-y: auto; + + position: relative; + /* Genug Abstand oben rechts, damit Links nicht hinter dem X liegen */ + padding: 4rem 1.5rem 2rem 1.5rem; } .nav__checkbox:checked ~ .nav__mobile-menu { @@ -237,6 +241,18 @@ CSS für die navbar left: 0; } + .nav__close-btn { + position: absolute; + top: 1rem; + right: 1.5rem; + font-size: 2rem; + color: #fff; + cursor: pointer; + line-height: 1; + user-select: none; + transition: color 0.2s ease, transform 0.2s ease; + } + .nav__mobile-menu a { color: #fff; text-decoration: none; diff --git a/includes/navbar.php b/includes/navbar.php index 564e929..9315b29 100644 --- a/includes/navbar.php +++ b/includes/navbar.php @@ -15,6 +15,9 @@ Globales Menü, wird via PHP später in alle Seiten eingebunden