Добрый день, задача такова, через @media подгружается css стиль для мобильных (при разрешении <980px) , в нем отредактированное Вертикальное меню, в котором, при наведении на родительский пункт меню, дочерние пункты начинают хаотично накладываться друг на друга, так и не получилось найти более менее адекватное решение, вполне возможно ошибка простая, прошу прощения. Сам пациент -
http://thermis.ru
Код меню
PHP код:
#cssmenu,
#cssmenu ul,
#cssmenu li,
#cssmenu span,
#cssmenu a {
margin:0;
padding:0;
width: 940px;
}
#cssmenu {
font-size: 28px;
text-align: center;
border-radius:0px 0px 0px 0px;
-moz-border-radius:0px 0px 0px 0px;
-webkit-border-radius:0px 0px 0px 0px;
background: #443133;
width: 980px;
margin:auto;
margin-bottom: 2%;
}
#cssmenu:after,
#cssmenu ul:after {
content: '';
display: block;
clear: both;
}
#cssmenu a {
background: #443133;
color: #fff;
display: inline-block;
font-family:'Jura', sans-serif;
font-size: 45px;
line-height: 55px;
padding: 0 20px;
text-decoration: none;
}
#cssmenu ul {
list-style: none;
}
#cssmenu > ul {
}
#cssmenu > ul > li {
}
#cssmenu > ul > li > a {
color: #fff;
font-size: 28px;
letter-spacing: 0px;
}
#cssmenu > ul > li:hover:after {
content: '';
display: block;
position: relative;
bottom: 10px;
border-left: 3px solid ;
border-right: 3px solid ;
border-bottom: 3px solid #e55822;
outline: none;
margin-left: -10px;
}
#cssmenu > ul > li:first-child > a {
border-radius: 0px 0 0 0;
-moz-border-radius: 0px 0 0 0;
-webkit-border-radius: 0px 0 0 0;
}
#cssmenu > ul > li.active:after {
content: '';
display: block;
position: relative;
bottom: 10px;
border-left: 3px solid ;
border-right: 3px solid ;
border-bottom: 3px solid #31F135;
margin-left: -10px;
}
#cssmenu > ul > li.active > a {
-moz-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.1);
-webkit-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.1);
box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.1);
background: #443133;
color: #FFF;
background: -moz-linear-gradient(top, #ececec 0%, #ffeeff ef 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ececec), color-stop(100%, #ffeeff ef));
background: -webkit-linear-gradient(top, #ececec 0%, #ffeeff ef 100%);
background: -o-linear-gradient(top, #ececec 0%, #ffeeff ef 100%);
background: -ms-linear-gradient(top, #ececec 0%, #ffeeff ef 100%);
background: linear-gradient(top, #ececec 0%, #ffeeff ef 100%);
}
#cssmenu > ul > li:hover > a {
transition: 0.7s;
background: #ececec;
background: -moz-linear-gradient(top, #ececec 0%, #ffeeff ef 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ececec), color-stop(100%, #ffeeff ef));
background: -webkit-linear-gradient(top, #ececec 0%, #ffeeff ef 100%);
background: -o-linear-gradient(top, #ececec 0%, #ffeeff ef 100%);
background: -ms-linear-gradient(top, #ececec 0%, #ffeeff ef 100%);
background: linear-gradient(top, #ececec 0%, #ffeeff ef 100%);
-moz-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.1);
-webkit-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.1);
box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.1);
background: #443133;
color: #FFF;
}
#cssmenu .deeper {
z-index: 10000;
}
#cssmenu .deeper:hover > ul {
display: block;
}
#cssmenu .deeper ul {
display: none;
position: absolute;
width: 200px;
top: 100%;
}
#cssmenu .deeper ul li {
*margin-bottom: -1px;
}
#cssmenu .deeper ul li a {
background: #F0F0F0;
transition-duration: 0.3s;
transition-delay: 0s, 0.5s;
transition-timing-function: linear;
filter: none;
font-size: 25px;
opacity: 1;
line-height: 120%;
padding: 15px;
color: #000000;
}
#cssmenu .deeper ul li:hover a {
background: #443133;
color: #FFF;
opacity: 1;
}
#cssmenu .deeper .deeper:hover > ul {
display: block;
}
#cssmenu .deeper .deeper ul {
display: none;
position: absolute;
top: 0;
}
#cssmenu .deeper .deeper ul li a {
background: #e55822;
border-bottom: 1px dotted #ff0f1b;
}
#cssmenu .deeper .deeper ul li a:hover {
background: #8f0007;
}
Решение:
Проблема решена путем добавления position: relative; в cssmenu .deeper ul