From 9d5d18619feac76a71635486fb83c9b1d16fcba7 Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Wed, 3 May 2023 21:39:26 +0000 Subject: [PATCH] improve hanburger menu style Signed-off-by: Arthur Lu --- css/nav.css | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/css/nav.css b/css/nav.css index 2ad9b14..561c4ae 100644 --- a/css/nav.css +++ b/css/nav.css @@ -11,21 +11,21 @@ nav a, nav h1, nav label { text-decoration: none; } -#hamitems a:hover, #hamitems a[aria-current="true"], #hamitems:hover a[aria-current="true"]:hover { - background-color: white; - color: black; -} - -#hamitems:hover a[aria-current="true"] { - background-color: black; - color: white; -} - #hamnav label, #hamburger { display: none; } @media screen and (min-width: 600px){ + #hamitems a:hover, #hamitems a[aria-current="true"], #hamitems:hover a[aria-current="true"]:hover { + background-color: white; + color: black; + } + + #hamitems:hover a[aria-current="true"] { + background-color: black; + color: white; + } + nav { display: flex; align-items: center; @@ -44,7 +44,10 @@ nav a, nav h1, nav label { #hamitems { display: block; - grid-column: 1 / span 2; + position: absolute; + top: 55px; + right: 0; + background-color: black; } #hamitems a { @@ -52,7 +55,6 @@ nav a, nav h1, nav label { display: block; text-align: center; width: 100%; - border-top: 1px solid #888; } #hamnav label {