This question has already been answered:

Actually how?

I try to fix the block using position with the value fixed, but when the window size changes (to a smaller size than the two blocks — the top and bottom — that needs to be fixed), this block (bottom) hits the top block.

enter image description here

Reported as a duplicate member of the Spirit of the Community Jun 27 '17 at 19:12 .

A similar question was asked earlier and an answer has already been received. If the answers provided are not exhaustive, please ask a new question .

    2 answers 2

    The z-index of the upper block must be greater than that of the lower one.

    Read more: http://htmlbook.ru/css/z-index

    • The problem is that the upper block is not fixed, and has a position: inherit - ikerya
    • Attach, please, screenshots - Denis Heavenly
    • Edited the question - ikerya
    • You can create a div in front of a fixed block and adjust the space with height. This is an option. - Denis Heavenly
    • For example? Can you demonstrate? - ikerya
     <div style="height: 50px"></div> <div class="footer-fixed"></div> 

    Inline style replace the usual.