Footer in Bootstrap, that extends with content or sticks to the bottom

后端 未结 3 1444
灰色年华
灰色年华 2020-12-17 05:55

I have been looking for a way to add a footer to a Twitter Bootstrap 3 project I am working on.

What I want is for the footer to stick to the bottom of the page when

3条回答
  •  半阙折子戏
    2020-12-17 06:46

    These days almost all browsers support viewport units. So used it to have sticky footer. It worked for me.

    You can check viewport support here.

    Adjust min-height for desired footer position when there is no content.

    #main {
       min-height: 70vh;
    }
    
    
    
    
    
    
    

    Content 1: Lorem ipsum, or lipsum as it is sometimes known, is dummy text used in laying out print, graphic or web designs.

提交回复
热议问题