How can I force my footer to stick to the bottom of any page in CSS?

前端 未结 10 1066
谎友^
谎友^ 2020-12-16 10:52

This is my code:

#footer {
   font-size: 10px;
   position:absolute;
   bottom:0;
   background:#ffffff;
}

I\'ve no idea what is wrong with

10条回答
  •  北荒
    北荒 (楼主)
    2020-12-16 11:29

    This is what I did and it caused my footer to stay at the bottom.

    .footer2{
    background-color:#606060 ;
    color: #ffffff;
    height: 30px;
    bottom:0px;
    position:fixed;
    width:100%;
    }
    

提交回复
热议问题