How to code a sticky footer using the html object, in HTML and CSS?

前端 未结 8 1434
刺人心
刺人心 2020-12-21 15:01

I\'m using Less Framework 4 for two websites I\'m designing. In both designs I want to apply a 5 pixel border both on top and bottom of the document.

The problem: be

相关标签:
8条回答
  • 2020-12-21 15:28

    You could instead use a footer wrapper like this.

    .footer {
      position: absolute;
      bottom: 0;
      border-bottom: solid @black 10px;
      width: 100%;
    }
    

    and just insert this right before </body> or somehting

    <div class="footer"></div>
    
    0 讨论(0)
  • 2020-12-21 15:28

    Try changing it to:

    height:auto;
    

    for your HTML CSS.

    0 讨论(0)
提交回复
热议问题