Code Notes

             how to set navigation bar up and footer down                     

source code:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body{
            display: flex;
            flex-direction: column;
            height: 100vh;
        }
        html{
            font-size: 62.5%;
        }
        footer{
            width: 100vw;
            height: 5rem;
            background-color: aqua;
            margin-top: auto;
        }
        footer p{
            color: black;
            font-size: 1.6rem;
            text-align: center;
            text-transform: capitalize;
            height: 5rem;
            line-height:5rem ;
        }
        *{
            margin: 0%;
            padding: 0%;
        }
        nav{
            display: flex;
            background-color: black;
        }
        nav li{
            list-style: none;
            font-size: large;
            margin-left: 15px;
            justify-content: space-between;
            /* background-color: black; */
            color: aliceblue;
        }
    </style>
</head>
<body>
    <nav>
        <li>home</li>
        <li>about</li>
        <li>profile</li>
        <li>contact</li>
        <li>payment</li>
        <li>documentation</li>
    </nav>
    <footer>
        <p>hello
        </p>
    </footer>
</body>
</html>


 

Post a Comment