简体   繁体   English

CSS页脚不在页面底部

[英]CSS Footer not at the bottom of the page

i have this CSS for my footer: 我的页脚有这个CSS:

/* FOOTER */
#footer {
    width:100%;
    height:580px;
    border-top:4px solid #666666;
    background-color:#eeeeee;
}
#footer-inner {
    width:80%;
    margin:0 auto 0 auto;
    height:inherit;
}
#footerTop {
    width:100%;
    height:480px;
    margin-top:10px;
    border-bottom:2px #000000 solid;
}
#footerTopLeft {
    width:30%;
    height:420px;
    float:left;
    display:inline;
    margin-top:10px;
    padding:0 15px 10px 15px;
    border-right:1px solid #000000;
}
#footerTopMid {
    width:30%;
    height:420px;
    float:left;
    display:inline;
    margin-top:10px;
    padding:0 15px 10px 15px;
    border-right:1px solid #000000;
}
#footerTopRight {
    width:30%;
    height:420px;
    float:left;
    display:inline;
    padding:0 15px 10px 15px;
}

i need there to be no gap at the bottom of the page but there is about half an inch gap for some reason 我需要页面底部没有间隙,但是由于某种原因大约有半英寸的间隙

here is a fiddle: http://jsfiddle.net/mYqS3/1/ 这是一个小提琴: http : //jsfiddle.net/mYqS3/1/

in #footerTop change margin-top to padding-top #footerTop margin-top更改为padding-top

#footerTop {
    width:100%;
    height:480px;
    padding-top:10px;
    border-bottom:2px #000000 solid;
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM