How to stick
element at the bottom of the page (HTML5 and CSS3)?

后端 未结 4 1291
离开以前
离开以前 2020-12-09 04:16

When I use position relative with no content, footer goes up, with absolute with a lot of content, the footer goes down, and with f

4条回答
  •  南笙
    南笙 (楼主)
    2020-12-09 04:36

    I would use this in HTML 5... Just sayin

    #footer {
      position: absolute;
      bottom: 0;
      width: 100%;
      height: 60px;
      background-color: #f5f5f5;
    }
    

提交回复
热议问题