Responsive Nav Bar Hides Element Below it

大憨熊 提交于 2019-12-04 06:52:18

问题


I created a responsive navigation bar, but it makes the element below, a Flexslider plug-in, disappear. Before I made the navigation bar, the Flexslider below would show up just fine, but now it doesn't. The z-index for the navbar is at 2, so I don't know what the problem is. How/What should I change to allow the Flexslider to show and the Navigation bar to still be responsive? Thank you!

My code is a bit lengthy, so there are code pens in the comments (it won't let me post them up here for some reason)

Here is a link to the website without the responsive navigation, but it shows the Flexslider: http://bancroftmiddleschool.org

Link to file with Responsive Navigation, but doesn't show Flexslider: http://bancroftmiddleschool.org/index%20copy.html


回答1:


Change the position CSS in #navBar from position:absolute; to position: relative;.

#navBar{
    position: relative;
    /* leave rest of the css unchanged */
}

Hope that's the desired effect.



来源:https://stackoverflow.com/questions/39382992/responsive-nav-bar-hides-element-below-it

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!