I am trying to create a very simple effect where the navigation sticks to the top of the page as you scroll down the page. All I should have to do is set "position: fixed" to the header, which I currently have. For some reason, it's treating it more like a "position: absolute" element vs. fixed. I tried it on other elements on the page with the same effect, so I must have something that in my HTML or CSS code that is causing the issue. Any ideas?
http://jsfiddle.net/apautler/yDhXG/1/embedded/result/
Header CSS
.nav-main {overflow: visible; position: fixed;
top: 0; left: 0; right: 0; height: 60px; width: 100%;}
Note, the site is responsive, so the position: fixed
kicks in at 768px.
question from:
https://stackoverflow.com/questions/14732403/position-fixed-not-working-for-header 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…