好吧,我是一種使我的個人網站,我編寫了幾天,我是一個初學者,我不知道爲什麼我的#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