Strange hack when using position:absolute

This commit is contained in:
Yorin Anne De Jong 2018-02-13 16:11:14 +01:00
parent 46eed1c223
commit e93b07f890

View File

@ -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;