好吧,我是一种使我的个人网站,我编写了几天,我是一个初学者,我不知道为什么我的#footer
滚动与我的网页。这是一个问题,因为它坚持在中间而不是我的网站的底部。为什么我的页脚在页面上滚动?
HTML:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<link rel="icon" type="image/png" href="icon.png" />
<link rel="stylesheet" type="text/css" href="style.css" />
<title>Naveen Niraula | Home</title>
</head>
<body>
<nav>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>
<div id="wrapper">
<div class="mcont">
<article class="firstart"><br>
<h1>How can you do that?</h1>
<p>What is the use of my website if there is nothing more</p><br>
</article>
<div class="test"></div>
</div>
<div id="test"></div>
</div>
<div id="footer">
<p class="footer">Copyright © 2014 Naveen Niraula. All Rights Reserved.</p>
</div>
</body>
</html>
CSS:
html, body {
margin: 0px;
}
nav {
background-color: #311310;
}
nav ul {
margin: 0px;
padding: 10px 0px 10px 100px;
}
nav ul li {
color: #d9d9d9;
display: inline;
padding: 0px 10px;
font-family: klavika;
font-size: 14pt;
}
nav ul li a {
color: #d9d9d9;
text-decoration: none;
}
nav ul li a:hover {
color: #ffffff;
}
#wrapper {
margin: 0px 100px 0px 100px;
background-color: #ebebeb;
}
.mcont {
margin: 0px 5px;
font-family: dejavu;
}
.firstart h1, p {
margin: 0px;
}
#footer {
padding: 5px;
background-color: #009688;
position: absolute;
bottom: 0px;
left: 0px;
right: 0px;
}
.footer {
padding: 0px 0px 0px 100px;
color: #333333;
font-family: condensed;
}
#test {
height: 1000px;
background-color: #008080;
}
为了使我的问题更加清晰。我已我的网站的截图向下跌破,请检查出来。
哦,是的,<div id="test"></div>
只是测试了页脚。
感谢您的关注,它是非常appriciated :) – 2014-09-02 13:40:36
但这种方法不适用于我的网站?我错过了什么,请帮助我格式化您的帮助,我的网站! – 2014-09-02 13:45:57
抱歉 - 在编辑中修复。再试一次。 – senectus 2014-09-02 13:48:27