如何将文档的边框粘贴到底部?

时间:2011-06-05 13:09:22

标签: html css sticky-footer

  

可能重复:
  How to code a sticky footer using the html object, in HTML and CSS?

我正在使用下面的(LESS)CSS在html对象的顶部和底部应用10px边框。它只适用于文档高于视口的情况。

现在是what's happening。正如您所看到的,border-bottom会粘在html的底部,但不会粘在窗口的底部。

我已经尝试用html填充bodyheight: 100%; height: auto; min-height: 100%;,但它似乎根本不起作用。有什么建议吗?

html {
    border-top: solid @black 10px;
    border-bottom: solid @black 10px;
    background: url('img/bg.png') repeat;
}

body {
    width: @8col;
    margin: 0px auto;
    padding: 100px 48px 84px;
    background: @white;
    font: 13px/20px 'OftenRegular';
    color: rgb(60,60,60);
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: @green;
}

0 个答案:

没有答案
相关问题