From 7a5bb775457bd5389a9b6b3ba98b3c2e2bace2c1 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 19 May 2023 20:31:16 +0000 Subject: [PATCH] header nav: switch to dropdown menus --- frontend/src/main.sass | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/frontend/src/main.sass b/frontend/src/main.sass index eaf61cf..6de67b7 100644 --- a/frontend/src/main.sass +++ b/frontend/src/main.sass @@ -1,13 +1,11 @@ header width: 100vw - min-height: 3em background-color: green color: white font-weight: 600 font-size: 1.2em line-height: 1.5em - white-space: nowrap a color: white @@ -17,25 +15,30 @@ header text-decoration: none // parent menu - & > nav ul + & > nav > ul display: inline list-style-type: none margin: 0 padding: 0 - overflow: hidden // menu items & > li - display: inline + display: inline-block padding: 4px 20px + white-space: nowrap - // submenus - & > ul - display: none - position: absolute - width: 100vw - z-index: 1 &:hover background-color: red & > ul display: block + + // submenus + & > ul + background-color: black + display: none + position: absolute + z-index: 1 + list-style-type: none + + & > li:hover + background-color: red