html - 根据页面中较少/较多的内容,页脚未显示在页面末尾

标签 html css

我有一个基于以下 css 的应用程序。该页面旨在显示员工数据库及其任务记录。我需要标题始终位于页面底部,即使内容数量较少/较多。我无法修复it.Once 当我修复较少的内容时,它会在添加更多内容时显示在内容上方。我需要帮助来解决这个问题...

* { padding:0; margin:0; outline:0; }
body {
    background:#f9ebae;
    font-family: Verdana, sans-serif;
    font-size:11px;
    line-height:14px;
    color:#5e5e5e;
    margin:0;
    padding:0;
    height:100%;
}
input, textarea, select { font-family: Verdana, sans-serif; font-size:13px; }
textarea { overflow:hidden; }

.field { border:solid 1px #d3cfc7; background:#fff; padding:5px; }
.small-field { border:solid 1px #d3cfc7; background:#fff; padding:3px 1px; font-size:11px; }

.checkbox { width:13px; height:13px; vertical-align:top; position:relative; top:2px; }

.button { background:#eee url(images/button.gif) repeat-x 0 0; border:solid 1px #b1a874; color:#7f7f7f; font-size:11px; padding:2px 6px 2px 6px; cursor:pointer; line-height:14px !important; }
.button:hover { color:#333; border-color:#857b42; }


.field:focus { color:#000; border-color:#857b42;}

a img { border:0; }

a { color:#ba4c32; text-decoration: underline; cursor:pointer; }
a:hover { color:#8d341f; text-decoration: none;}

.left, .alignleft { float:left; display:inline; }
.right, .alignright { float:right; display:inline; }
.rights, .alignright { float:right; display:inline; }

.cl { font-size:0; line-height:0; clear:both; display:block; height:0; }

.al { text-align: left; }
.ar { text-align: right; }
.ac { text-align: center !important; }

h1{ font-size:22px; font-family:Georgia, "Times New Roman", Times, serif; line-height:24px; color:#fff; font-weight: normal;}
h1 a{ color:#fff; text-decoration: none; }
h11{ font-size:32px; font-family:"Times New Roman", Times, serif; line-height:30px; color:#fff; font-weight: normal;}
h11 a{ color:#fff; text-decoration: none; }
h2 { font-size:15px; font-weight: normal; }
h2 a{ text-decoration: none; }
h22 { font-size:20px; font-family:"Times New Roman", Times, serif; font-weight: normal; }
h22 a{ text-decoration: none; }
h3 { font-size:12px; color:#3333FF; line-height:14px; font-weight: normal; }
h3 a{ text-decoration: none; }



.shell { ; margin:0; auto; }
#header { height:89px; background:url(images/header.gif); white-space:nowrap; }
#header h1{ float:left; display:inline; padding-top:12px; }
#top-navigation { float:right; white-space:nowrap; color:#fff; padding-top:15px; }
#top-navigation a{ color:#fff; }
#top-navigation span{ color:#dca598; }
#top { height:53px;}

#navigation { height:36px;}
#navigation ul{ list-style-type: none;}
#navigation ul li{ float:left; display:inline; margin-right:2px;}
#navigation ul li a,
#navigation ul li a span { float:left; height:36px; background:url(images/tab.gif) no-repeat 0 0; padding:0 0 0 15px;}
#navigation ul li a span { background-position:right 0; padding:0 15px 0 0;}
#navigation ul li a { line-height:36px; color:#907525; text-decoration: none; }

#navigation ul li a.active,
#navigation ul li a:hover { background-position:0 bottom;}

#navigation ul li a.active span,
#navigation ul li a:hover span{ background-position:right bottom; }

#navigation ul li a.active { font-size:12px; font-weight: bold; color:#887e42; }

#wrapper {
    min-height:100%;
    height: auto !important;
    height: 100%;
    margin: 0 auto -4em;
}
#wrapper1 {
    min-height:200%;
    position:relative;
}

#container   { padding:20px 0; padding-bottom:44px;}
#container10 { padding:20px 0; padding-bottom:44px; min-height:100%;}


.small-nav  { color:#978b48; padding-bottom:20px; }
.small-nav a{ color:#6f6636; }


#main { overflow:auto; padding-bottom: 44px; }
#content { float:left; width:98%;  padding:0 0 44px 2px; }
#contents { float:left; width:auto;  padding:0 0 0 300px;  }
#sidebar { float:right; width:225px; }


.table {}
.table th{ background:#fffdfa url(images/th.gif) repeat-x 0 0; color:#818181; text-align: left; padding:7px 10px; border-bottom:solid 1px #d2d1cb;}
.table td{ background:#fbfcfc;  border-bottom:solid 1px #e0e0e0; padding:8px 10px; }
.table tr.odd td{ background:#f8f8f8; }
.table tr:hover td{ background:#fff9e1; }
.table a.ico{ }

.box { background:#fbfcfc; height:auto; width:auto; padding:1px; margin-bottom:20px; }
.box-head { background:#ba4c32; height:32px; color:#fff; padding: 0 10px; line-height:32px; white-space:nowrap; border-bottom:solid 1px #fff; }
.box-head .rights{ padding:10px 0 10px 1px; line-height:13px;}
.box-head .rights label,
.box-head .rights input { float:left; }
.box-head .rights label { padding:4px 0 0 0;}
.box-head .rights input { margin-left:5px;}
.box-head .right{ padding:5px 0 10px 1px; line-height:13px; }
.box-head .right label,
.box-head .right input { float:left; }
.box-head .right label { padding:4px 0 0 0;}
.box-head .right input { margin-left:5px;}

.pagging { height:20px; padding:8px 0px; line-height:19px; color:#949494; }
.pagging a{ background:url(images/pagging.gif) repeat-x 0 0; height:20px; float:left; padding:0 8px; border:solid 1px #d5d5d5; text-decoration: none; color:#949494; margin-left:5px;  }
.pagging a:hover { border-color:#8c3521; background:#ba4c32; color:#fff; }
.pagging span{ float:left; margin-left:5px; padding-top:2px; }


a.ico { color:#9d9c9a; font-size:10px; text-decoration: none; padding:0 0 0 14px; background-repeat:no-repeat; background-position:0 0; }
a.ico:hover { color:#333;}
a.del { background-image:url(images/delete.gif); margin-left:10px;}
a.edit { background-image:url(images/ed.gif); margin-left:10px;}
a.status { background-image:url(images/i.gif); margin-left:10px;}

.form { padding:15px 10px 5px 10px; }
.form label{ display:block; font-weight: bold; font-size:13px; padding-bottom:4px; }
.form label span{ color:#999; font-weight: normal;}
.form .field { display:block; }
.form .inline-field .field { display:inline;}
.form .req { font-size:13px; float:right; white-space:nowrap; color:#999;  }
.form p{ padding-bottom:15px; }

.size1 { width:716px; }
.size2 { width:80px; }
.size3 { width:120px; }
textarea.size1 { height:180px; }

.buttons { text-align: right; padding:10px; background:#eee; border-top:solid 1px #e0e0e0; }
.buttons .button{ margin-left:3px;}

.box-content { padding:10px; }

.sort { border-top:solid 1px #e0e0e0; padding-top:10px; margin-top:15px;   }
.sort label{ display:block; font-weight: bold;}
.sort .field{ display:block; margin-top:5px; }
.sort select.field{ width:203px; }


.box-content p { padding-top:10px; }
.select-all{}
.select-all label{ text-decoration: underline; padding-left:4px; }

.add-button,
.add-button span { float:left; height:26px; background:url(images/add-button.gif) no-repeat 0 0; padding:0 0 0 28px; }
.add-button span { background-position:right 0; padding:0 10px 0 0; }
.add-button { font-weight: bold; font-size:12px; color:#747474; text-decoration: none; line-height:26px; }
.add-button:hover { color:#333;}


#footer { height:44px; margin-top: -44px; background:url(images/footer.gif); line-height:44px; width:100%; color:#fff; position:relative; bottom:0; left:0; clear:both; }
#footer a{ color:#fff;}
#footer, #push {
height: 4em;
}
#footer, #push {
clear: both;
}

.msg { position:relative; padding-right:35px; margin-bottom:10px; }
.msg p{ padding:9px 10px 9px 40px; font-size:12px; background-repeat:no-repeat; background-position:10px 5px;}
.msg a.close{ font-size:0; line-height:0; position:absolute; top:0; right:0; width:34px; height:34px; background:url(images/close.gif); text-indent: -4000px;}

.msg-ok p{ background-color:#fffac2; border:solid 1px #dbd6a2; color:#5e5c40; background-image:url(images/ok.gif); }
.msg-error p{ background-color:#f3c598; border:solid 1px #e8b084; color:#ba4c32; background-image:url(images/msg-error.gif);  }

/*** CSS3 ***/
.box { -moz-border-radius:5px; -webkit-border-radius:5px; -moz-box-shadow: 0 0 6px #978f6c; -webkit-box-shadow: 0 0 6px #978f6c;}
.box-head { -moz-border-radius-topleft:5px; -moz-border-radius-topright:5px; -webkit-border-top-left-radius:5px; -webkit-border-top-right-radius:5px; }

.field, .button { -moz-border-radius:4px; -webkit-border-radius:4px; }
.small-field, .button, .pagging a { -moz-border-radius:3px; -webkit-border-radius:3px; }

.msg p { -moz-border-radius:6px; -webkit-border-radius:6px; }

.button { -moz-box-shadow: 0 0 2px #978f6c; -webkit-box-shadow: 0 0 2px #978f6c;}

.rrshow{
    display:none;
}

<!--Print query css-->

@media print
{
    .print-hidden {
        display: none;
    }

    a {
        display: none;
    }
}

最佳答案

试试这个把它放在底部

position:absolute;
bottom:0;

关于html - 根据页面中较少/较多的内容,页脚未显示在页面末尾,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24949398/

相关文章:

css - Target Parent 和其他一些选择器

jquery - 如何去除主页上的水印?

jquery - 从特定标签中删除样式属性

html - 将导航栏中的元素向右移动的代码或语法是什么

javascript - 单元格背景颜色不改变javascript

javascript - .NET MVC 会给我所需的 HTML/CSS/JS 分离吗?

html - 为什么相对定位元素从窗口的顶 Angular 开始?

javascript - 页面主体上指定的字体大小会影响其 iframe 吗?

css - Div 比应有的宽得多

html - <sup> 当在带有文本装饰下划线的元素内给出时,在 chrome 中使用下划线