CSS子菜单覆盖问题

时间:2015-10-10 21:09:20

标签: html css drop-down-menu hover submenu

我试图设置这个并排的2列菜单,每个列子菜单都打开到另一侧。左侧菜单工作正常,子菜单按钮可单击,但右侧菜单子菜单项位于左侧菜单元素下。我尝试使用z-index,但它使左菜单项不可点击(悬停也不起作用)。请参阅http://kink.cz/najforever/index_copy.html以获取参考。 您能否建议我如何正确显示正确的菜单子菜单项? 非常感谢您的帮助。

HTML:

<div class='people'>
<div id='cssmenu'>
    <ul>
        <li class='active has-sub' id='fake'><a href='#'><span>A fake artist</span></a>
            <ul>
                <li class='has-sub'><a href='#'><span>Blog</span></a></li>
                <li class='has-sub'><a href='#'><span>Facebook</span></a></li>
                <li class='has-sub'><a href='#'><span>Instagram</span></a></li>
            </ul>
        </li>
        <li class='active has-sub' id='danny'><a href='#'><span>Danny Rose Fashion</span></a>
            <ul>
                <li class='has-sub'><a href='#'><span>Blog</span></a></li>
                <li class='has-sub'><a href='#'><span>Facebook</span></a></li>
                <li class='has-sub'><a href='#'><span>Instagram</span></a></li>
            </ul>
        </li>
        <li class='active has-sub' id='heels'><a href='#'><span>Heels in Prague</span></a>
            <ul>
                <li class='has-sub'><a href='#'><span>Blog</span></a></li>
                <li class='has-sub'><a href='#'><span>Facebook</span></a></li>
                <li class='has-sub'><a href='#'><span>Instagram</span></a></li>
            </ul>
        </li>
        <li class='active has-sub' id='hodanajan'><a href='#'><span>Hodanajan</span></a>
            <ul>
                <li class='has-sub'><a href='#'><span>Blog</span></a></li>
                <li class='has-sub'><a href='#'><span>Facebook</span></a></li>
                <li class='has-sub'><a href='#'><span>Instagram</span></a></li>
            </ul>
        </li>
        <li class='active has-sub' id='jakub'><a href='#'><span>Jakub Mařík</span></a>
            <ul>
                <li class='has-sub'><a href='#'><span>Web</span></a></li>
                <li class='has-sub'><a href='#'><span>Facebook</span></a></li>
                <li class='has-sub'><a href='#'><span>Instagram</span></a></li>
            </ul>
        </li>
    </ul>
</div>
<div id='cssmenu2'>
    <ul>
        <li class='active has-sub' id='kaa'><a href='#'><span>Kaa Glo</span></a>
            <ul>
                <li class='has-sub'><a href='#'><span>Blog</span></a></li>
                <li class='has-sub'><a href='#'><span>Facebook</span></a></li>
                <li class='has-sub'><a href='#'><span>Instagram</span></a></li>
            </ul>
        </li>
        <li class='active has-sub' id='pau'><a href='#'><span>Paulinemma</span></a>
            <ul>
                <li class='has-sub'><a href='#'><span>Blog</span></a></li>
                <li class='has-sub'><a href='#'><span>Facebook</span></a></li>
                <li class='has-sub'><a href='#'><span>Instagram</span></a></li>
            </ul>
        </li>
        <li class='active has-sub' id='red'><a href='#'><span>Red Poppy Stories</span></a>
            <ul>
                <li class='has-sub'><a href='#'><span>Blog</span></a></li>
                <li class='has-sub'><a href='#'><span>Facebook</span></a></li>
                <li class='has-sub'><a href='#'><span>Instagram</span></a></li>
            </ul>
        </li>
        <li class='active has-sub' id='kisic'><a href='#'>Sandra Kisic</a>
            <ul>
                <li class='has-sub'><a href='#'><span>Blog</span></a></li>
                <li class='has-sub'><a href='#'><span>Facebook</span></a></li>
                <li class='has-sub'><a href='#'><span>Instagram</span></a></li>
            </ul>
        </li>
        <li class='active has-sub' id='aesthet'><a href='#'><span>The Aesthet</span></a>
            <ul>
                <li class='has-sub'><a href='#'><span>Blog</span></a></li>
                <li class='has-sub'><a href='#'><span>Facebook</span></a></li>
                <li class='has-sub'><a href='#'><span>Instagram</span></a></li>
            </ul>
        </li>
    </ul>
</div>

CSS:

/* ===========================
   ====== Name Menu Right ====== 
   =========================== */

#cssmenu {
  padding: 0;
  margin: 0;
  border: 0;
  line-height: 1;
  text-align:left
}

#cssmenu ul,
#cssmenu ul li,
#cssmenu ul ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
#cssmenu ul {
  position: relative;
  z-index: 597;
  float: left;
}

#cssmenu ul li {
  float: left;
  min-height: 1px;
  line-height: 1em;
  vertical-align: middle;
  position: relative;
}
#cssmenu ul li.hover,
#cssmenu ul li:hover {
  position: relative;
  z-index: 599;
  cursor: default;
}
#cssmenu ul ul {
  visibility: hidden;
  position: absolute;
  top: 100%;
  left: 200px;
  z-index: 598;
}
#cssmenu ul ul li {
  float: none;
  right:250px;
}
#cssmenu ul ul ul {
  top: -2px;
  right: 0;
}
#cssmenu ul li:hover > ul {
  visibility: visible;
}
#cssmenu ul ul {
  top: 1px;
  left: 99%;
}
#cssmenu ul li {
  float: none;
}
#cssmenu ul ul {
  margin-top: 1px;
}
#cssmenu ul ul li {
  font-weight: normal;
}

/* Custom CSS Styles Menu Right*/
#cssmenu {
  width: 130px;
  background: white;
  font-family: 'Oxygen Mono', Tahoma, Arial, sans-serif;
  zoom: 1;
  font-size: 12px;
  float:right;
  margin-left:5px;
}
#cssmenu:before {
  content: '';
  display: block;
}
#cssmenu:after {
  content: '';
  display: table;
  clear: both;
}
#cssmenu a {
  display: block;
  padding: 6px 0px;
  color: black;
  text-decoration: none;
  padding-right:5px;
}
#cssmenu > ul {
  width: 130px;
}
#cssmenu ul ul {
  width: 130px;
}
#cssmenu > ul > li > a {
  color: black;
}
#cssmenu > ul > li > a:hover {
  color: black;
}
#cssmenu > ul > li.active a {
  background: white;
}
#cssmenu > ul > li a:hover,
#cssmenu > ul > li:hover a {
  background: white;
}
#cssmenu li {
  position: relative;
}

#cssmenu ul ul li.first {
  -webkit-border-radius: 0 3px 0 0;
  -moz-border-radius: 0 3px 0 0;
  border-radius: 0 3px 0 0;
}
#cssmenu ul ul li.last {
  -webkit-border-radius: 0 0 3px 0;
  -moz-border-radius: 0 0 3px 0;
  border-radius: 0 0 3px 0;
  border-bottom: 0;
}
#cssmenu ul ul {
  -webkit-border-radius: 0 3px 3px 0;
  -moz-border-radius: 0 3px 3px 0;
  border-radius: 0 3px 3px 0;
}
#cssmenu ul ul {
    margin-left:2px;
    text-align:right;
}
#cssmenu ul ul a {
  font-size: 12px;
  color: black;
}
#cssmenu ul ul a:hover {
  color: black;
}
#cssmenu ul ul li {
}
#cssmenu ul ul li:hover > a {
  background: black;
  color: #ffffff;
}
#cssmenu.align-right > ul > li > a {
  border-left: 4px solid black;
  border-right: none;
}
#cssmenu.align-right {
  float: right;
}
#cssmenu.align-right li {
  text-align: right;
}

#cssmenu.align-right ul li.has-sub > a:after {
  content: none;
}
#cssmenu.align-right ul ul {
  visibility: hidden;
  position: absolute;
  top: 0;
  left: -100%;
  z-index: 598;
  width: 100%;
}
#cssmenu.align-right ul ul li.first {
  -webkit-border-radius: 3px 0 0 0;
  -moz-border-radius: 3px 0 0 0;
  border-radius: 3px 0 0 0;
}
#cssmenu.align-right ul ul li.last {
  -webkit-border-radius: 0 0 0 3px;
  -moz-border-radius: 0 0 0 3px;
  border-radius: 0 0 0 3px;
}
#cssmenu.align-right ul ul {
  -webkit-border-radius: 3px 0 0 3px;
  -moz-border-radius: 3px 0 0 3px;
  border-radius: 3px 0 0 3px;
}

/* ===========================
   ====== Name Menu Left ====== 
   =========================== */

#cssmenu2 {
  padding: 0;
  margin: 0;
  border: 0;
  line-height: 1;
  text-align:right;
}

#cssmenu2 ul,
#cssmenu2 ul li,
#cssmenu2 ul ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
#cssmenu2 ul {
  position: relative;
  z-index: 597;
  float: left;
}

#cssmenu2 ul li {
  float: left;
  min-height: 1px;
  line-height: 1em;
  vertical-align: middle;
  position: relative;
}
#cssmenu2 ul li.hover,
#cssmenu2 ul li:hover {
  position: relative;
  z-index: 599;
  cursor: default;
}
#cssmenu2 ul ul {
  visibility: hidden;
  position: absolute;
  top: 100%;
  left: 0px;
  z-index: 598;
  width: 100%;
  text-align:left;
}
#cssmenu2 ul ul li {
  float: none;
  margin-left:4px;
}
#cssmenu2 ul ul ul {
  top: -2px;
  right: 0;
}
#cssmenu2 ul li:hover > ul {
  visibility: visible;
}
#cssmenu2 ul ul {
  top: 1px;
  left: 99%;
}
#cssmenu2 ul li {
  float: none;
}
#cssmenu2 ul ul {
  margin-top: 1px;
}
#cssmenu2 ul ul li {
  font-weight: normal;
}

/* Custom CSS Styles Menu Left*/
#cssmenu2 {
  width: 130px;
  background: white;
  font-family: 'Oxygen Mono', Tahoma, Arial, sans-serif;
  zoom: 1;
  font-size: 12px;
  float:right;
  margin-left:5px;
}
#cssmenu2:before {
  content: '';
  display: block;
}
#cssmenu2:after {
  content: '';
  display: table;
  clear: both;
}
#cssmenu2 a {
  display: block;
  padding: 6px 0px;
  color: black;
  text-decoration: none;
  padding-right:5px;
}
#cssmenu2 > ul {
  width: 130px;
}
#cssmenu2 ul ul {
  width: 130px;
}
#cssmenu2 > ul > li > a {
  border-right: 4px solid black;
  color: black;
}
#cssmenu2 > ul > li > a:hover {
  color: black;
}
#cssmenu2 > ul > li.active a {
  background: white;
}
#cssmenu2 > ul > li a:hover,
#cssmenu2 > ul > li:hover a {
  background: white;
}
#cssmenu2 li {
  position: relative;
}

#cssmenu2 ul ul li.first {
  -webkit-border-radius: 0 3px 0 0;
  -moz-border-radius: 0 3px 0 0;
  border-radius: 0 3px 0 0;
}
#cssmenu2 ul ul li.last {
  -webkit-border-radius: 0 0 3px 0;
  -moz-border-radius: 0 0 3px 0;
  border-radius: 0 0 3px 0;
  border-bottom: 0;
}
#cssmenu2 ul ul {
  border-right: 2px solid black;
  background:white;
  margin-top:-2px;
}
#cssmenu2 ul ul {
    margin-left:2px;
}
#cssmenu2 ul ul a {
  font-size: 12px;
  color: black;
}
#cssmenu2 ul ul a:hover {
  color: black;
}
#cssmenu2 ul ul li {
}
#cssmenu2 ul ul li:hover > a {
  background: black;
  color: #ffffff;
}
#cssmenu2.align-right > ul > li > a {
  border-left: 4px solid black;
  border-right: none;
}
#cssmenu2.align-right {
  float: right;
}
#cssmenu2.align-right li {
  text-align: right;
}

#cssmenu2.align-right ul li.has-sub > a:after {
  content: none;
}
#cssmenu2.align-right ul ul {
  visibility: hidden;
  position: absolute;
  top: 0;
  left: -100%;
  z-index: 598;
  width: 100%;
}
#cssmenu2.align-right ul ul li.first {
  -webkit-border-radius: 3px 0 0 0;
  -moz-border-radius: 3px 0 0 0;
  border-radius: 3px 0 0 0;
}
#cssmenu2.align-right ul ul li.last {
  -webkit-border-radius: 0 0 0 3px;
  -moz-border-radius: 0 0 0 3px;
  border-radius: 0 0 0 3px;
}
#cssmenu2.align-right ul ul {
  -webkit-border-radius: 3px 0 0 3px;
  -moz-border-radius: 3px 0 0 3px;
  border-radius: 3px 0 0 3px;
}

/* ===========================
   ====== Contact Form ====== 
   =========================== */

input, textarea {
    padding: 10px;
    border: 1px solid #E5E5E5;
    width: 400px;
    color: #999999;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 0px 8px;
    -moz-box-shadow: rgba(0, 0, 0, 0.1) 0px 0px 8px;
    -webkit-box-shadow: rgba(0, 0, 0, 0.1) 0px 0px 8px;     
}

textarea {
    width: 400px;
    height: 150px;
    max-width: 400px;
    line-height: 18px;
}

input:hover, textarea:hover,
input:focus, textarea:focus {
    border-color: 1px solid #C9C9C9;
    box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 8px;
    -moz-box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 8px;
    -webkit-box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 8px; 
}

.form label {
    color: #999999;
}

/*  Submit Button */

.submit input {
    width: 100px; 
    height: 40px;
    background-color: #474E69; 
    color: #FFF;
    border-radius: 3px;
    -moz-border-radius: 3px;
    -webkit-border-radius: 3px;     
}

3 个答案:

答案 0 :(得分:0)

修正了你的CSS。适用于许多地方的变更。你需要再使用一些CSS来使菜单看起来与左侧菜单相同。

#cssmenu {
  padding: 0;
  margin: 0;
  border: 0;
  line-height: 1;
  text-align:left
}

#cssmenu ul,
#cssmenu ul li,
#cssmenu ul ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
#cssmenu ul {
  position: relative;
  z-index: 597;
  float: left;
}

#cssmenu ul li {
  float: left;
  min-height: 1px;
  line-height: 1em;
  vertical-align: middle;
  position: relative;
}
#cssmenu ul li.hover,
#cssmenu ul li:hover {
  position: relative;
  z-index: 599;
  cursor: default;
}
#cssmenu ul ul {
  display:none;
  position: absolute;
  top: 100%;
  z-index: 598;
}
#cssmenu ul ul li {
  float: none;
}
#cssmenu ul ul ul {
  top: -2px;
  right: 0;
}
#cssmenu ul li:hover > ul {
  display:block;
  z-index:99999;
}
#cssmenu ul ul {
  top: 1px;
  right: 100%;
}
#cssmenu ul li {
  float: none;
}
#cssmenu ul ul {
  margin-top: 1px;
}
#cssmenu ul ul li {
  font-weight: normal;
}

/* Custom CSS Styles Menu Right*/
#cssmenu {
  width: 130px;
  background: white;
  font-family: 'Oxygen Mono', Tahoma, Arial, sans-serif;
  zoom: 1;
  font-size: 12px;
  float:right;
  margin-left:5px;
}
#cssmenu:before {
  content: '';
  display: block;
}
#cssmenu:after {
  content: '';
  display: table;
  clear: both;
}
#cssmenu a {
  display: block;
  padding: 6px 0px;
  color: black;
  text-decoration: none;
  padding-right:5px;
}
#cssmenu > ul {
  width: 130px;
}
#cssmenu ul ul {
  width: 130px;
}
#cssmenu > ul > li > a {
  color: black;
}
#cssmenu > ul > li > a:hover {
  color: black;
}
#cssmenu > ul > li.active a {
  background: white;
}
#cssmenu > ul > li a:hover,
#cssmenu > ul > li:hover a {
  background: white;
}
#cssmenu li {
  position: relative;
}

#cssmenu ul ul li.first {
  -webkit-border-radius: 0 3px 0 0;
  -moz-border-radius: 0 3px 0 0;
  border-radius: 0 3px 0 0;
}
#cssmenu ul ul li.last {
  -webkit-border-radius: 0 0 3px 0;
  -moz-border-radius: 0 0 3px 0;
  border-radius: 0 0 3px 0;
  border-bottom: 0;
}
#cssmenu ul ul {
  -webkit-border-radius: 0 3px 3px 0;
  -moz-border-radius: 0 3px 3px 0;
  border-radius: 0 3px 3px 0;
}
#cssmenu ul ul {
    margin-left:2px;
    text-align:right;
}
#cssmenu ul ul a {
  font-size: 12px;
  color: black;
}
#cssmenu ul ul a:hover {
  color: black;
}
#cssmenu ul ul li {
}
#cssmenu ul ul li:hover > a {
  background: black;
  color: #ffffff;
}
#cssmenu.align-right > ul > li > a {
  border-left: 4px solid black;
  border-right: none;
}
#cssmenu.align-right {
  float: right;
}
#cssmenu.align-right li {
  text-align: right;
}

#cssmenu.align-right ul li.has-sub > a:after {
  content: none;
}
#cssmenu.align-right ul ul {
  visibility: hidden;
  position: absolute;
  top: 0;
  left: -100%;
  z-index: 598;
  width: 100%;
}
#cssmenu.align-right ul ul li.first {
  -webkit-border-radius: 3px 0 0 0;
  -moz-border-radius: 3px 0 0 0;
  border-radius: 3px 0 0 0;
}
#cssmenu.align-right ul ul li.last {
  -webkit-border-radius: 0 0 0 3px;
  -moz-border-radius: 0 0 0 3px;
  border-radius: 0 0 0 3px;
}
#cssmenu.align-right ul ul {
  -webkit-border-radius: 3px 0 0 3px;
  -moz-border-radius: 3px 0 0 3px;
  border-radius: 3px 0 0 3px;
}

/* ===========================
   ====== Name Menu Left ====== 
   =========================== */

#cssmenu2 {
  padding: 0;
  margin: 0;
  border: 0;
  line-height: 1;
  text-align:right;
}

#cssmenu2 ul,
#cssmenu2 ul li,
#cssmenu2 ul ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
#cssmenu2 ul {
  position: relative;
  float: left;
}

#cssmenu2 ul li {
  float: left;
  min-height: 1px;
  line-height: 1em;
  vertical-align: middle;
  position: relative;
}
#cssmenu2 ul li.hover,
#cssmenu2 ul li:hover {
  position: relative;
  z-index: 599;
  cursor: default;
}
#cssmenu2 ul ul {
  visibility: hidden;
  position: absolute;
  top: 100%;
  left: 0px;
  z-index: 598;
  width: 100%;
  text-align:left;
}
#cssmenu2 ul ul li {
  float: none;
  margin-left:4px;
}
#cssmenu2 ul ul ul {
  top: -2px;
  right: 0;
}
#cssmenu2 ul li:hover > ul {
  visibility: visible;
}
#cssmenu2 ul ul {
  top: 1px;
  left: 99%;
}
#cssmenu2 ul li {
  float: none;
}
#cssmenu2 ul ul {
  margin-top: 1px;
}
#cssmenu2 ul ul li {
  font-weight: normal;
}

/* Custom CSS Styles Menu Left*/
#cssmenu2 {
  width: 130px;
  background: white;
  font-family: 'Oxygen Mono', Tahoma, Arial, sans-serif;
  zoom: 1;
  font-size: 12px;
  float:right;
  margin-left:5px;
}
#cssmenu2:before {
  content: '';
  display: block;
}
#cssmenu2:after {
  content: '';
  display: table;
  clear: both;
}
#cssmenu2 a {
  display: block;
  padding: 6px 0px;
  color: black;
  text-decoration: none;
  padding-right:5px;
}
#cssmenu2 > ul {
  width: 130px;
}
#cssmenu2 ul ul {
  width: 130px;
}
#cssmenu2 > ul > li > a {
  border-right: 4px solid black;
  color: black;
}
#cssmenu2 > ul > li > a:hover {
  color: black;
}
#cssmenu2 > ul > li.active a {
  background: white;
}
#cssmenu2 > ul > li a:hover,
#cssmenu2 > ul > li:hover a {
  background: white;
}
#cssmenu2 li {
  position: relative;
}

#cssmenu2 ul ul li.first {
  -webkit-border-radius: 0 3px 0 0;
  -moz-border-radius: 0 3px 0 0;
  border-radius: 0 3px 0 0;
}
#cssmenu2 ul ul li.last {
  -webkit-border-radius: 0 0 3px 0;
  -moz-border-radius: 0 0 3px 0;
  border-radius: 0 0 3px 0;
  border-bottom: 0;
}
#cssmenu2 ul ul {
  border-right: 2px solid black;
  background:white;
  margin-top:-2px;
}
#cssmenu2 ul ul {
    margin-left:2px;
}
#cssmenu2 ul ul a {
  font-size: 12px;
  color: black;
}
#cssmenu2 ul ul a:hover {
  color: black;
}
#cssmenu2 ul ul li {
}
#cssmenu2 ul ul li:hover > a {
  background: black;
  color: #ffffff;
}
#cssmenu2.align-right > ul > li > a {
  border-left: 4px solid black;
  border-right: none;
}
#cssmenu2.align-right {
  float: right;
}
#cssmenu2.align-right li {
  text-align: right;
}

#cssmenu2.align-right ul li.has-sub > a:after {
  content: none;
}
#cssmenu2.align-right ul ul {
  visibility: hidden;
  position: absolute;
  top: 0;
  left: -100%;
  z-index: 598;
  width: 100%;
}
#cssmenu2.align-right ul ul li.first {
  -webkit-border-radius: 3px 0 0 0;
  -moz-border-radius: 3px 0 0 0;
  border-radius: 3px 0 0 0;
}
#cssmenu2.align-right ul ul li.last {
  -webkit-border-radius: 0 0 0 3px;
  -moz-border-radius: 0 0 0 3px;
  border-radius: 0 0 0 3px;
}
#cssmenu2.align-right ul ul {
  -webkit-border-radius: 3px 0 0 3px;
  -moz-border-radius: 3px 0 0 3px;
  border-radius: 3px 0 0 3px;
}

/* ===========================
   ====== Contact Form ====== 
   =========================== */

input, textarea {
    padding: 10px;
    border: 1px solid #E5E5E5;
    width: 400px;
    color: #999999;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 0px 8px;
    -moz-box-shadow: rgba(0, 0, 0, 0.1) 0px 0px 8px;
    -webkit-box-shadow: rgba(0, 0, 0, 0.1) 0px 0px 8px;     
}

textarea {
    width: 400px;
    height: 150px;
    max-width: 400px;
    line-height: 18px;
}

input:hover, textarea:hover,
input:focus, textarea:focus {
    border-color: 1px solid #C9C9C9;
    box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 8px;
    -moz-box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 8px;
    -webkit-box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 8px; 
}

.form label {
    color: #999999;
}

/*  Submit Button */

.submit input {
    width: 100px; 
    height: 40px;
    background-color: #474E69; 
    color: #FFF;
    border-radius: 3px;
    -moz-border-radius: 3px;
    -webkit-border-radius: 3px;     
}
<div class='people'>
<div id='cssmenu'>
    <ul>
        <li class='active has-sub' id='fake'><a href='#'><span>A fake artist</span></a>
            <ul>
                <li class='has-sub'><a href='#'><span>Blog</span></a></li>
                <li class='has-sub'><a href='#'><span>Facebook</span></a></li>
                <li class='has-sub'><a href='#'><span>Instagram</span></a></li>
            </ul>
        </li>
        <li class='active has-sub' id='danny'><a href='#'><span>Danny Rose Fashion</span></a>
            <ul>
                <li class='has-sub'><a href='#'><span>Blog</span></a></li>
                <li class='has-sub'><a href='#'><span>Facebook</span></a></li>
                <li class='has-sub'><a href='#'><span>Instagram</span></a></li>
            </ul>
        </li>
        <li class='active has-sub' id='heels'><a href='#'><span>Heels in Prague</span></a>
            <ul>
                <li class='has-sub'><a href='#'><span>Blog</span></a></li>
                <li class='has-sub'><a href='#'><span>Facebook</span></a></li>
                <li class='has-sub'><a href='#'><span>Instagram</span></a></li>
            </ul>
        </li>
        <li class='active has-sub' id='hodanajan'><a href='#'><span>Hodanajan</span></a>
            <ul>
                <li class='has-sub'><a href='#'><span>Blog</span></a></li>
                <li class='has-sub'><a href='#'><span>Facebook</span></a></li>
                <li class='has-sub'><a href='#'><span>Instagram</span></a></li>
            </ul>
        </li>
        <li class='active has-sub' id='jakub'><a href='#'><span>Jakub Mařík</span></a>
            <ul>
                <li class='has-sub'><a href='#'><span>Web</span></a></li>
                <li class='has-sub'><a href='#'><span>Facebook</span></a></li>
                <li class='has-sub'><a href='#'><span>Instagram</span></a></li>
            </ul>
        </li>
    </ul>
</div>
<div id='cssmenu2'>
    <ul>
        <li class='active has-sub' id='kaa'><a href='#'><span>Kaa Glo</span></a>
            <ul>
                <li class='has-sub'><a href='#'><span>Blog</span></a></li>
                <li class='has-sub'><a href='#'><span>Facebook</span></a></li>
                <li class='has-sub'><a href='#'><span>Instagram</span></a></li>
            </ul>
        </li>
        <li class='active has-sub' id='pau'><a href='#'><span>Paulinemma</span></a>
            <ul>
                <li class='has-sub'><a href='#'><span>Blog</span></a></li>
                <li class='has-sub'><a href='#'><span>Facebook</span></a></li>
                <li class='has-sub'><a href='#'><span>Instagram</span></a></li>
            </ul>
        </li>
        <li class='active has-sub' id='red'><a href='#'><span>Red Poppy Stories</span></a>
            <ul>
                <li class='has-sub'><a href='#'><span>Blog</span></a></li>
                <li class='has-sub'><a href='#'><span>Facebook</span></a></li>
                <li class='has-sub'><a href='#'><span>Instagram</span></a></li>
            </ul>
        </li>
        <li class='active has-sub' id='kisic'><a href='#'>Sandra Kisic</a>
            <ul>
                <li class='has-sub'><a href='#'><span>Blog</span></a></li>
                <li class='has-sub'><a href='#'><span>Facebook</span></a></li>
                <li class='has-sub'><a href='#'><span>Instagram</span></a></li>
            </ul>
        </li>
        <li class='active has-sub' id='aesthet'><a href='#'><span>The Aesthet</span></a>
            <ul>
                <li class='has-sub'><a href='#'><span>Blog</span></a></li>
                <li class='has-sub'><a href='#'><span>Facebook</span></a></li>
                <li class='has-sub'><a href='#'><span>Instagram</span></a></li>
            </ul>
        </li>
    </ul>
</div>

答案 1 :(得分:0)

试着改变这个类..它会起作用。

#cssmenu ul ul {
    margin-left: 113px;
    text-align: right;
}

让我知道任何问题

答案 2 :(得分:0)

希望它会起作用,我已经检查了@MarianRehak ..

中删除z-index
#cssmenu2 ul{}

并添加此类

#cssmenu2 ul li:hover ul {
    z-index: 999999 !important;
}

休息你可以玩这个职位..现在基本问题将得到解决..