I have a header at the top that holds the following CSS rule:
position: fixed;
I also have some images that hold (and need to hold) the following CSS rule:
position: relative;
The problem is that my header always sits at the top of the page as the user scrolls, but when they get to the image (with position: relative
) this sits on top of my header. But the header should always be on top. Is there another CSS rule I can apply to allow this to happen?
That problem might be with z-index
. Give your header z-index:999999999
and your problem will be solved.