尝试在 WordPress 侧栏上设置 z-index 以使标题重叠
我一直在这个网站上到处使用 z-index。我想要的是将侧边栏隐藏在弯曲的标题图像下方。这是我正在开发的 WP 网站:http://evansvillechamber.org/wordpress/ 其操作方式如下在 HTML 中查找,我正在尝试复制:http://www.evansvillechamber.org/。我尝试将侧边栏设置为 a - z-index,并将标题和品牌图像设置为高正 z-index,但没有。还尝试在索引模板中移动侧边栏。还有其他想法吗?谢谢!
I've been fooling around with z-index all over the place on this site. What I want is to have the sidebar tucked underneath the curved header image. Here's the WP site I'm working on: http://evansvillechamber.org/wordpress/ and here's how it looks in HTML and which I am trying to replicate: http://www.evansvillechamber.org/. I tried setting the sidebar to a - z-index and the header and branding image both to high positive z-index, but nada. Also tried moving the sidebar around in the index template. Any other ideas? Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
只需将
position:relative
添加到 style.css 文件的第 165 行即可解决问题。屏幕截图
Just add a
position:relative
to line 165 of your style.css file and that should fix the problem.screenshot
尝试将“position:absolute”添加到您的元素中。像这样的事情:
请告诉我这是否适合您。谢谢!
Try adding "position:absolute" to your element. Something like this:
Please let me know if that works for you or not. Thanks!
好的,尝试在 #branding 中添加“position:absolute”,并在 #primary 中添加边距:
Ok, try adding "position:absolute" to #branding and adding margins to #primary: