Cześć,
od paru dni walczę z responsywnym menu i nie mogę przeskoczyć pewnego błędu. Otóż wszystko działa, ale gdy na telefonie odpalam przycisk który wyświetla menu to owe menu nachodzi się z tekstem, który jest w .header-txt i nie da się włączyć nic z menu, bo blokuje to tekst. Jak to można ogarnąć?
OBRAZEKkod:
<ul class="menu">
<li><a href="#work">Our Work</a></li>
<li><a href="#about">About</a></li>
<li><a href="#careers">Careers</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
...
<div class="header-txt">
Centrum monitoringu
</div>
i CSS:
/* header */
ul {
margin: 1%;
list-style: none;
overflow: hidden;
font-family: 'PT Sans', sans-serif;
}
li a {
display: block;
padding: 20px 20px;
text-decoration: none;
}
li a:hover,
background-color: #181818;
}
/* menu */
clear: both;
max-height: 0;
transition: max-height .2s ease-out;
}
/* menu icon */
cursor: pointer;
display: inline-block;
float: right;
padding: 28px 20px;
position: relative;
user-select: none;
}
background: white;
display: block;
height: 2px;
position: relative;
transition: background .2s ease-out;
width: 18px;
}
.header .menu
-icon
.navicon
:before
, .header .menu
-icon
.navicon
:after
{ background: white;
content: '';
display: block;
height: 100%;
position: absolute;
transition: all .2s ease-out;
width: 100%;
}
.header .menu
-icon
.navicon
:before
{ top: 5px;
}
.header .menu
-icon
.navicon
:after
{ top: -5px;
}
/* menu btn */
display: none;
}
.header .menu
-btn
:checked ~
.menu
{ max-height: 240px;
}
.header .menu
-btn
:checked ~
.menu
-icon
.navicon
{ background: transparent;
}
.header .menu
-btn
:checked ~
.menu
-icon
.navicon
:before
{ transform: rotate(-45deg);
}
.header .menu
-btn
:checked ~
.menu
-icon
.navicon
:after
{ transform: rotate(45deg);
}
.header .menu
-btn
:checked ~
.menu
-icon
:not
(.steps
) .navicon
:before
, .header .menu
-btn
:checked ~
.menu
-icon
:not
(.steps
) .navicon
:after
{ top: 0;
}
/* 48em = 768px */
@media (min-width: 48em) {
float: left;
}
padding: 20px 30px;
}
clear: none;
float: right;
max-height: none;
}
display: none;
}
}