0
您好,我必須爲使用WordPress的網站創建一個水平的子菜單。我還有一個問題,當您在頁面中途向下滾動鏈接時,子菜單出現在頁面的一半處。我相信這是因爲:CSS子菜單頁面滾動
position: fixed;
top: 264px;
left: 50%;
width: 1000px;
margin-left:-500px;
有沒有辦法解決這個問題?
的網址是:http://dev.timson.me
而CSS(上 「即將到來的」 & 「過去生產」 子菜單)是:
#access {
clear: both;
display: block;
float: left;
margin: 0 auto 6px;
padding-top: 8px;
width: 100%;
font-family: Stag;
display:block;
text-align:center;
}
#access ul {
font-size: 13px;
list-style: none;
margin: 0 0 0 -0.8125em;
padding-left: 0;
display:inline-block;
}
.sub-menu {
text-align: center;
}
#menu-default > li {
float: left;
position: relative;
}
.sub-menu > li {
display: inline-block;
}
#access a {
color: #eee;
display: block;
line-height: 25px;
margin-top: -4px;
margin-bottom: -4px;
padding: 0 1.2125em;
text-decoration: none;
}
#access ul ul {
display: none;
float: left;
margin-top: 0;
position: fixed;
top: 264px;
left: 50%;
width: 1000px;
z-index: 99999;
margin-left:-500px;
text-align:center;
padding-top:5px;
padding-bottom:10px;
background: red;
}
#access ul ul a {
margin-top: 0px;
margin-right: auto;
margin-bottom: 0px;
margin-left: auto;
padding-bottom:10px;
}
#access ul li:hover > ul {
display: block;
}
任何幫助是極大的讚賞。
乾杯, 彼得
是對的,固定是問題! – Joerg 2012-03-06 02:53:58
嗯。不爲我修復(FF 10.0.2)。 – SenorAmor 2012-03-06 03:00:27