How to stop Sticky Footer from covering content…?

后端 未结 4 1705
一生所求
一生所求 2021-01-31 05:39

I\'m using a \"sticky\" footer, but on a couple of pages it overlays the content. Is there any way to prevent this from happening, but retaining it\'s \"sticky\" quality?

<
4条回答
  •  别那么骄傲
    2021-01-31 06:00

    As amit said, you should put a margin-bottom for your body and use min-height instead of height:

    body {
       min-height: 400px;
       margin-bottom: 100px;
       clear: both;
    }
    

    And you should remove height:100% from

    Hope this helps!

提交回复
热议问题