我的CSS菜单在Wordpress中从Overflow-X中剥落

我的CSS菜单在Wordpress中从Overflow-X中剥落,css,wordpress,html-lists,scrollbar,overflow,Css,Wordpress,Html Lists,Scrollbar,Overflow,当我将鼠标悬停在菜单项上时,我的CSS菜单会打开或关闭浏览器的水平滚动条。我尝试了各种css组合来处理溢出 overflow-x:hidden; 及 但这些只是切断了我在菜单中的下拉元素,并在我的菜单中加入了一个滚动条 以下是我的菜单源代码: /* Main Menu*/ #menu { font-family: 'sharetech', sans-serif; float: right; height: auto; font-size: 18px; padding: 0; margin: 1

当我将鼠标悬停在菜单项上时,我的CSS菜单会打开或关闭浏览器的水平滚动条。我尝试了各种css组合来处理溢出

overflow-x:hidden;

但这些只是切断了我在菜单中的下拉元素,并在我的菜单中加入了一个滚动条

以下是我的菜单源代码:

/* Main Menu*/
#menu {
font-family: 'sharetech', sans-serif;
float: right;
height: auto;
font-size: 18px;
padding: 0;
margin: 14px 0 0 0;
}
#menu a {
display: block;
line-height: 1em;
text-decoration: none;
color: gray;
padding: 2px 10px;
}
#menu:after, #menu ul:after {
content: '';
display: block;
clear: both; 
}
#menu ul, #menu li {
list-style: none;
margin: 0;
padding: 0;
}

#menu ul {
position: relative;
z-index: 597;
}
#menu ul li {
float: left;
min-height: 1px;
vertical-align: middle;
}
#menu ul li.hover,
#menu ul li:hover {
position: relative;
z-index: 599;
cursor: default;
}
#menu ul ul {
visibility: hidden;
position: absolute;
top: 100%;
left: 0;
z-index: 598;
width: 100%;
}
#menu ul ul li {
float: none;
}
#menu ul ul ul {
border-top: 0 none;
top: 0;
left: auto;
right: -99.5%;
}
#menu ul li:hover > ul {
visibility: visible;
}
#menu ul ul {
bottom: 0;
left: 0;
margin-top: 0;
border-top: 4px solid #1b9bff;
text-transform: none;
min-width: 190px;
}
#menu ul ul a{
background: #1b9bff;
color: #FFF;
border: 1px solid #0082e7;
border-top: 0 none;
line-height: 150%;
padding: 10px 10px;
}
#menu ul ul li {
font-weight: normal;
position: relative
}
#menu > ul > li > a {
line-height: 48px;
}
#menu ul ul li:first-child > a {
border-top: 1px solid #0082e7;
}
#menu ul ul li:hover > a {
background: #35a6ff;
}
#menu ul ul li:last-child > a {
border-radius: 0 0 3px 3px;
box-shadow: 0 1px 0 #1b9bff; 
}
#menu ul ul li:last-child:hover > a {
border-radius: 0 0 0 3px;
}
#menu ul ul li.has-sub > a:after {
position: absolute;
top: 50%;
right: 15px;
margin-top: -8px;
}
#menu ul li:hover > a, #menu ul li.active > a {
background: #1b9bff;
color: #FFF;
}
#menu ul li.has-sub > a:after {
margin-left: 5px; 
}
#menu ul li.last ul {
left: auto;
right: 0; 
}
#menu ul li.last ul ul {
left: auto;
right: 99.5%;
}

你是对的,尼克斯,它在伪类中。我想是这样的,这就是我们所缺少的

#fmenu ul ul li {
float: none;
width: 190px; <----set width
}
#fmenu ul li{
浮动:无;

width:190px;你能用JSFIDLE把整个东西都画出来吗?一个FIDLE会更好,但是给你一个提示,检查所有的伪类,或者最好在没有它们的情况下查看输出。
#fmenu ul ul li {
float: none;
width: 190px; <----set width
}