When you set position:fixed
on your header, this means it has come out of the normal flow of execution.
With this some of your page's content is available but behind the header itself. so a margin-top equal to the header height on the element after header will fix it.
You can also use a z-index:10
( a value more that the position:absolute
div) to make it come on top of the page.
Coming to your second part of the question that fixed
is changed to absolute
. I don't see that happening here.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…