正如标题所说,我在使用网站页脚时遇到了麻烦,无论出于什么原因,我似乎无法弄清楚为什么页脚会破坏,我尝试了通过谷歌找到的众多粘性页脚选项但似乎没有真正起作用或完全抛弃我的代码。任何帮助都将非常感激,我仍在学习!
@import url("reset.css");
@font-face {
font-family: 'Maiandra';
src: url('fonts/MAIAN.TTF');
}
/* Static Header */
#header {
background-color: #676767;
height: 35px;
font-family: Maiandra;
color: #FFFFFF;
font-size: 12px;
margin: 0px auto;
text-align: center
}
/* Body */
html {
position: relative;
min-height: 100%;
}
body {
font-family: Maiandra;
font-size: 15px;
color: #333;
margin: 0 0 60px;
}
p {
padding: 10px;
}
p strong {
font-weight: bold;
}
#wrapper {
margin: 0 auto;
width: 800px;
overflow: visible;
height: 100%
}
/* Content Area */
.content {
float: right;
background: #FFFFFF;
width: 600px;
overflow: sroll;
padding-bottom: 100px;
}
.leftcolumn {
background: #ffffff;
width: 175px;
float: left;
}
.rightcolumn {
width: 175px;
float: right;
}
img {
display: block;
margin-left: auto;
margin-right: auto;
padding-top: 2px;
}
h1 {
font-family: Maiandra
font-weight: bold;
font-size: 20px;
padding-top: 15px;
padding-left: 10px;
}
h2 {
font-family: Maiandra;
font-weight: bold;
font-size: 20px;
padding-top: 15px;
padding-left: 10px;
}
h3 {
font-family: Maiandra;
font-weight: bold;
font-size: 20px;
padding-top: 15px;
padding-left: 10px;
}
h4 {
font-family: Maiandra;
font-weight: bold;
font-size: 20px;
padding-top: 15px;
padding-left: 10px;
}
h6 {
font-family: Maiandra;
font-weight: bold;
font-size: 15px;
padding-top: 15px;
padding-left: 10px;
}
/* Static Footer */
.footer {
position: absolute;
left: 0;
bottom: 0;
height: 60px;
width: 100%;
background: #E8E8E8;
text-align: center;
font-family: Maiandra;
color: #000000;
font-size: 12px;
border-style: solid;
border-top: 1px solid #7F7D7D;
overflow: auto;
}
.footer p{
margin-top: 5px;
height: 10px;
}
答案 0 :(得分:0)
我实际上找到了答案!
将此添加到我的HTML ..
<!--<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">-->
<!--<!DOCTYPE HTML>-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">