From e93b07f890b9354c11cf29f127d9e85cfa6c1a3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rn=20A=CC=8Ane?= Date: Tue, 13 Feb 2018 16:11:14 +0100 Subject: [PATCH] Strange hack when using position:absolute --- www/css/style.css | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/www/css/style.css b/www/css/style.css index 370fb1b..c1f2f51 100644 --- a/www/css/style.css +++ b/www/css/style.css @@ -73,9 +73,13 @@ nav li.active, nav li:hover { } @media(max-width: 800px){ - nav #menu, nav #menu li.active, nav #menu_toggle, nav #menu:target li.active a, nav #login { + nav #menu, nav #menu li.active, nav #menu_toggle, nav #login { position: absolute; } + nav #menu li.active { + top: -3em; /* -3em for absolute, 0 for fixed.. huh? */ + left: 0; + } nav { z-index: 1000; @@ -106,10 +110,6 @@ nav li.active, nav li:hover { nav #menu:target li, nav #menu li.active { display: block; } - nav #menu li.active { - top: 0; - left: 0; - } nav #menu_toggle, nav #menu:target li.active a { display: block;