0
我绑,使全宽下拉菜单这种结构http://jsfiddle.net/cstEv/创建全宽度下拉菜单
与CSS我目前我不能中心(这是我从来没有做过) subnav ul
因为ul
poistioning来源是父li
。 有谁知道如何让ul
.children
中心在#menu
div?
我绑,使全宽下拉菜单这种结构http://jsfiddle.net/cstEv/创建全宽度下拉菜单
与CSS我目前我不能中心(这是我从来没有做过) subnav ul
因为ul
poistioning来源是父li
。 有谁知道如何让ul
.children
中心在#menu
div?
我已经做了以下修改:
来源:
.children {
display: none;
width: 560px;
min-height: 30px;
position: absolute;
left: -244px;
top: 48px;
text-align: left;
background-color: #c7c7c7;
}
.children li {
position: relative;
float: left;
margin-left: 20px;
}
要:
.children{
display: none;
min-height: 30px;
position: relative;
text-align: left;
top: 10px;
}
li:nth-child(3) .children{
right: 252px;
}
li:last-child .children{
right: 502px;
}
li:nth-child(3) .children li {
position: relative;
float: left;
width: 628px !important;
}
li:last-child .children li{
position: relative;
float: left;
width: 628px !important;
}
这是伟大的,但我需要的是为'子''ul'为全宽(与菜单大小相同),而不是父'li'的大小。 – zero 2013-02-25 17:18:57
如果结构必须改变,以实现这也很酷也 – zero 2013-02-25 17:26:34
Ooooh,明白了......你的意思是像[这](http://jsfiddle.net/hkpy5/2/)? – 2013-02-25 17:49:38