作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
正如标题所说,我在使用网站页脚时遇到了问题,无论出于何种原因,我似乎无法弄清楚页脚为什么会中断,我已经尝试了通过谷歌找到的多种粘性页脚选项但似乎没有真正起作用或完全抛弃我的代码。任何帮助将不胜感激,我仍在学习!
@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;
}
最佳答案
我真的找到了答案!
将其添加到我的 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">
关于css - Internet Explorer 破坏了页脚,是的,我试过粘性页脚,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29838304/
我是一名优秀的程序员,十分优秀!