Skip to content Skip to sidebar Skip to footer

Body Text Goes Over The Top Of Fixed Nav Bar

I have a fixed nav bar, that follows when scrolling. But upon scrolling over text/images within tags it seems to go in front of the navbar, rather then behind. Why is this? How ca

Solution 1:

This is usually caused by your z-index, make sure you put:

CSS

z-index: 500// or whatever number that is a positive real number.

Yep, I was right, see this DEMO.

Solution 2:

nav {
    background-color: #262626;
    height: 60px;
    z-index:1; //any higher integer value
    width: 100%;
    position: fixed;
    top: 0;
    bottom: 0;
    -webkit-box-shadow: 0px0px8px0px#000000;
    -moz-box-shadow: 0px0px8px0px#000000;
    box-shadow: 0px0px8px0px#000000;
}

Refer z-index in W3Schools also Refer CSS-Tricks

Post a Comment for "Body Text Goes Over The Top Of Fixed Nav Bar"