admin管理员组文章数量:1414863
I've been struggling with this for a while now and need some help. I'm trying to create a quite specific navigation setup for a client.
I have a top level navigation which is hard coded and not a problem. The second level of navigation should populate the left sidebar of the site, it should also show a third level of nestled/folding navigation within it. The fourth level of navigation is then shown separately in a column next to the left sidebar.
The illustration below should help explain:
The issues I'm having is no solution I've come across can do all of these things.
In an ideal world I'd love to have one dynamic template rather than having lots but any help would be great.
I've been struggling with this for a while now and need some help. I'm trying to create a quite specific navigation setup for a client.
I have a top level navigation which is hard coded and not a problem. The second level of navigation should populate the left sidebar of the site, it should also show a third level of nestled/folding navigation within it. The fourth level of navigation is then shown separately in a column next to the left sidebar.
The illustration below should help explain:
The issues I'm having is no solution I've come across can do all of these things.
In an ideal world I'd love to have one dynamic template rather than having lots but any help would be great.
Share Improve this question edited Aug 25, 2019 at 20:44 Glorfindel 6093 gold badges10 silver badges18 bronze badges asked Jan 20, 2012 at 15:32 Simon MelhuishSimon Melhuish 31 bronze badge 3- What is the behavior if a child is not yet selected, or would one always be? – mor7ifer Commented Jan 20, 2012 at 15:58
- if a child isn't selected then the grandchild wouldn't be expanded, it would just be a list of children. If that makes sense. – Simon Melhuish Commented Jan 20, 2012 at 16:26
- Yup, perfect sense, gimmie a few minutes and I'll post a solution with example code :) – mor7ifer Commented Jan 20, 2012 at 16:34
1 Answer
Reset to default 0Took a decent amount of tinkering, but I came up with something workable based around absolute positioning, I did not apply any hover actions, those should be relatively easy for you to do (don't forget to z-index). Here's the CSS I would use:
#m {
list-style: none;
}
#m > li {
padding: 15px;
float: left;
}
#m .sub-menu {
display: none;
position: absolute;
top: 50px;
left: 0;
width: 300px;
}
#m .sub-menu .sub-menu {
position: static;
}
#m .sub-menu .sub-menu .sub-menu {
position: absolute;
width: 200px;
top: 0;
left: 300px;
}
#m .current-menu-ancestor > .sub-menu {
display: block;
}
#m .current-menu-parent > .sub-menu {
display: block;
}
#m
is your menu holder, you can set that to whatever, the rest is default from wordpress, so you can't change that around too much without going to a custom walker or something...but why would you do that? Anyways, if you need help with the hover actions or anything, let me know.
本文标签: pagesAdvanced Multi Tier Navigation across columns
版权声明:本文标题:pages - Advanced Multi Tier Navigation across columns 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745216272a2648185.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论