Home > Net >  How do I make text appear outside of my header/footer?
How do I make text appear outside of my header/footer?

Time:12-15

I'm a beginner at CSS/HTML, and I'm working on a small project. I found the code to make a header and footer online, and text will appear in these areas as intended, but no text will appear in the non-header portion of the page. Any advice? (Code for reference, the second one is my stylesheet.)

<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 >
                <h1><a href="index.html">Organization</a></h1>
            <div >
                <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 >
                <div >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}

CodePudding user response:

You've got to close your header element

<body>
            <div >
                <h1><a href="index.html">Organization</a></h1>

            <!-- You needed this closing tag -->
            </div>

            <div >
                <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>
            <div >
                <div >Insert Text Lol</div>        
            </div>
        </body>
  • Related