2015-10-10 92 views
0

我想設置這個2列菜單,並列與每個列子菜單打開到不同的一面。左側菜單正常工作,子菜單按鈕可點擊,但右側菜單子菜單項位於左側菜單元素下。我嘗試使用z-index,它工作,但使左菜單項不可點擊(懸停也沒有工作)。請參閱http://kink.cz/najforever/index_copy.html以供參考。 你能否建議我如何能正確顯示正確的菜單子菜單項? 非常感謝您的幫助。CSS子菜單覆蓋問題

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

回答

0

希望它會工作,我已經檢查@MarianRehak任何問題..

剛剛從

#cssmenu2 ul{} 

刪除z-index,並添加這個類

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

休息,你可以與位置玩..基本問題將得到解決,現在..

+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>

0

剛剛嘗試改變這種類..它會工作。

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

讓我知道

+0

謝謝你,請你澄清我爲什麼要改變利潤率左屬性?我不認爲它會解決覆蓋問題。 –

+1

爲了更具體一些,我想在菜單的左側顯示右側子菜單項,左側菜單位於此處。所以它應該或多或少地位於現在的位置,但在菜單項上,因此它是可見的。代碼在這裏工作在stackoverflow(點擊運行代碼片段,但不知何故在我的網站上以相同的方式)。 –

+0

我已經回答了下面的問題。請檢查並讓我知道。 @MarianRehak – CreativePS