gpt4 book ai didi

html - Wordpress CSS 无法正确显示导航

转载 作者:行者123 更新时间:2023-11-28 14:09:52 25 4
gpt4 key购买 nike

我在 wordpress 上创建了一个网站,第二层菜单(如果您单击“服装”或“包”则显示)从父页面下方开始

无论点击'服装'还是'包包',我都希望与一级菜单保持一致

http://www.dawaf.co.uk/showroom/bags

/*Main Navigation
------------------------------------------------------------ */
#access {
background: none;
-webkit-box-shadow: none;
text-align:center;
box-shadow: none;
margin: -10px auto 6px;
text-transform: uppercase;
font-weight: bold;
}

#access div {
margin: 0 0.5%;
}

#access a {
color: #EEEEEE;
line-height: 2.2;
padding: 0 8px;
font-size: 12px;
}



#access ul ul {
width: 800px;
}

#access ul ul a {
width: auto;
background: transparent !important;
font-weight: bold;
font-size: 12px;
}

#access ul ul li:hover a {
color: #666666;
}

#access li.current_page_item ul {
display: block;
}

#access li:hover > a {
background: transparent !important;
color: #666;
}

#access ul li:hover > ul {
display: none;
}

#access ul li.current_page_item:hover > ul {
display: block;
}

/*Submenu
------------------------------------------------------------ */

#access ul ul {
-webkit-box-shadow: none;
box-shadow: none;
}

#access ul ul a {
background: #000;
border-bottom: none;
color: #EEEEEE;
line-height: 0.4;
}

#access li:hover > a, #access ul ul :hover > a, #access a:focus {
background: #FFF;
}

ul.children {
width: 1000px !important;
background: transparent !important;
margin-top: -15px !important;
border-top: 1px solid #EEEEEE;
}

最佳答案

您是否希望它们像在顶部菜单项的右侧一样内嵌?即:

服装-包袋> 日 |晚上

或者您是否希望它们在页面左侧同一位置的顶部菜单行下排列?即:

服装 - 手袋天 |晚上

服装 - 手袋连衣裙 |连衣裤

无论哪种方式,您都希望使用“#access ul ul”css 属性。您的二级菜单是嵌套在主级菜单的 ul 中的 ul。如果您无法按原样获得所需的控件,您可能希望将二级菜单拆分到它自己的未嵌套的 ul 中。

关于html - Wordpress CSS 无法正确显示导航,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9608372/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com