我是一个css/html的初学者,我正在做一个小项目.我在网上找到了制作页眉和页脚的代码,文本将按预期出现在这些区域中,但不会出现在页面的非页眉部分.有什么建议吗?(参考代码,第二个是我的样式表.)
<DOCTYPE! html>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<html lang="en-US">
<head>
<link rel="stylesheet" href="css attempt">
<title>Prism Outreach</title>
</head>
<body>
<div class="fixed-header">
<h1><a href="index.html">Organization</a></h1>
<div class="container">
<nav>
<a href="#">About</a>
<a href="#">Resources</a>
<a href="#">Donate</a>
<a href="#">Projects</a>
<a href="#">Contact Us</a>
</nav>
</div>
</div>
<!--I have attempted to put <p> here, but the text does not appear.-->
<div class="fixed-footer">
<div class="container">Insert Text Lol</div>
</div>
</body>
body {
padding-top:60px;
padding-bottom: 40px;}
p {
color:black;}
.fixed-header, .fixed-footer {
width: 100%;
position: fixed;
background: rgb(0, 0, 0);
padding: 10px 0;
color: aliceblue;
text-align: center;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
font-size: large;}
a:link {text-decoration: none;}
a:visited {text-decoration: none;}
a:hover {text-decoration: none;}
a:active {text-decoration: none;}
.fixed-header {top: 0;}
.fixed-footer {bottom: 0;}
.container {
width: 100%;
margin: 0 auto;}
nav a {
color: #fff;
text-decoration: none;
padding: 7px 25px;
display: inline-block}