使用div+CSS将页脚始终控制在页面最下方的方法

2020-04-30 15:11:31易采站长站整理

body{position:relative;height:auto !important;height:100%;min-height:100%;}     
  
html {     
    height:100%;     
}     
body {     
    margin:0;     
    padding:0;     
    position:relative;     
    height:auto !important;     
    height:100%;     
    min-height:100%;     
    text-align:center;     
}     
.fl {     
    float:left;     
    display:inline;     
}     
#header {     
    width:100%;     
    height:80px;     
}     
#container {     
    width:100%;     
    height:300px;     
    overflow:hidden;     
    border-bottom:#FFFFFF 60px solid;     
}     
.aside {     
    width:30%;     
}     
.article {     
    width:70%;     
}     
#footer {     
    height:50px;     
    position:absolute;     
    width:100%;     
    clear:both;     
    bottombottom:0;     
    left:0;     
    border-bottom:1px solid #e0e0e0;     
    border-top:1px solid #e0e0e0;     
}    

XML/HTML Code复制内容到剪贴板

<div id="header">     
    <div>     
        <img src="" width= height= alt="" />     
        <div>     
            <p>fddfv</p>