2016-04-21 319 views
0

你好,我一直在積極編寫一個新的菜單爲phpbb爲我的新論壇與我的社區,我只有一個問題,它的竊聽我如此糟糕的問題,我有當我設置所有當我增加了一個下拉它開始好做這個菜單它工作得很好,那麼代碼...下拉菜單拉到右

[.navbar2 { 
    position: absolute; /* Ensures that the menu doesn’t affect other elements */ 
    border-radius: 4px 0; 
    } 
.navbar2 li  { 
    left: auto; 
    display: inline; 
    padding: 0 5px; 
    float: left; /* This lines up the menu items horizontally */ 
    list-style: none; /* Removes the default styling (bullets) for the list */ 
} 
.navbar2 li ul { 
    position: absolute; 
    z-index: 100; 
    display: none; /* Hides the drop-down menu */ 
    color: #565656; 
    min-width: 150px; 
    max-height: 1000px; 
    border-radius: 4px 0; 
}  
.navbar2 li ul li { 
    background-color: #fff; 
    min-width: 150px; 
    padding: 0 5px 0 20px; 
} 
.navbar2 li:hover ul { 
    display: block; /* Displays the drop-down box when the menu item is hovered over */ 
    border-radius: 4px; 
} 

/*NAV 3*/ 

.navbar3 { 
    border-radius: 4px 0; 
    } 
.navbar3 li  { 
    display: inline-block; 
    list-style: none; /* Removes the default styling (bullets) for the list */ 
} 
.navbar3 li ul { 
    position: absolute; 
    z-index: 100; 
    min-width: 150px; 
    display: none; /* Hides the drop-down menu */ 
    color: #565656; 
    float:right; 
    margin-left:2px; 
}  
.navbar3 ul li { 
    background-color: #fff; 
    min-width: 150px; 
    padding: 0 5px 0 20px; 
} 
.navbar3 li:hover ul { 
    display: block; /* Displays the drop-down box when the menu item is hovered over */ 
    border-radius: 4px; 
    margin-left:-10px; 
    float:right; 
    margin-left:2px; 
}] 

dropdown bug 1

dropdown bug 2

+0

請提供您的HTML一個的jsfiddle鏈接或至少粘貼還有CSS,以便用戶可以複製的問題,並更好地幫助你 – Ortund

回答

0

一些斷漂浮餡後:左碼我發現了這個問題廣告對所有固定資產

代碼在這裏提供的..

.navbar2 { 
    position: absolute; /* Ensures that the menu doesn’t affect other elements */ 
    border-radius: 4px 0; 
    } 
.navbar2 li  { 
    left: auto; 
    padding: 0 5px; 
    list-style: none; /* Removes the default styling (bullets) for the list */ 
} 
.navbar2 li ul { 
    position: absolute; 
    z-index: 100; 
    display: none; /* Hides the drop-down menu */ 
    color: #565656; 
    min-width: 150px; 
    max-height: 1000px; 
    border-radius: 4px 0; 
}  
.navbar2 li ul li { 
    background-color: #fff; 
    min-width: 150px; 
} 
.navbar2 li:hover ul { 
    display: block; /* Displays the drop-down box when the menu item is hovered over */ 
    border-radius: 4px; 
    margin-left:-10px; 
    float:right; 
    margin-left:2px; 
} 

/*NAV 3*/ 

.navbar3 { 
    border-radius: 4px 0; 
    } 
.navbar3 li  { 
    list-style: none; /* Removes the default styling (bullets) for the list */ 
} 
.navbar3 li ul { 
    position: absolute; 
    z-index: 100; 
    min-width: 150px; 
    display: none; /* Hides the drop-down menu */ 
    color: #565656; 
    float:right; 
    margin-left:2px; 
}  
.navbar3 ul li { 
    background-color: #fff; 
    min-width: 150px; 
    padding: 0 5px 0 20px; 
} 
.navbar3 li:hover ul { 
    display: block; /* Displays the drop-down box when the menu item is hovered over */ 
    border-radius: 4px; 
    margin-left:-10px; 
    float:right; 
    margin-left:2px; 
}