How do I make sure that my footer shows all the way at end of the page rather than in the middle?

前端 未结 2 1304
别跟我提以往
别跟我提以往 2021-01-07 11:25

Here\'s my footer css:

 .footer {
      background-color: #CACACA;
      font-size: 20px;
      height: 50px;
      padding-top: 10px;
      position: absol         


        
2条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-07 11:54

    like so

      
    
    
        My Amazing Footer
        
    
    
        

    HTML Ipsum Presents

    © My Website 2013. All Rights Reserved!

    see we have the footer in the wrapper and the footer is absolute to the bottom and left of the wrapper then we just add the height of the footer to the wrapper bottom padding and some default height on the wrapper and body and that's sorted, take a look on jsfiddle here - http://jsfiddle.net/eTwJh/2/ and here is one with no content - http://jsfiddle.net/eTwJh/3/

提交回复
热议问题