samedi 21 mars 2020

ul not going in a div for the header

i'm trying to make a transparent header for my website, but for some reason the ul is going below the div. any help? code:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>aindev's Website</title>
    <link rel="stylesheet" href="style.css">
    <link href="https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300;0,400;0,500;0,700;0,900;1,300;1,400;1,500;1,700;1,900&display=swap" rel="stylesheet">
</head>
<body>
    <div class="header">
        <h1>aindev</h1>
        <ul>
            <li><a href="index.html">Home</a></li>
            <li><a href="downloads.html">Downloads</a></li>
        </ul>
    </div>
</body>
</html>
*{
    margin: 0;
    padding: 0;
}
body{
    font-family: Rubik;
}
.header{
    width: 100%;
    height: 80px;

}
.header h1{
    text-align: center;
}
.header ul li{
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: inline;
}

i tried many stackoverflow questions and other forums for coding, but all don't seem to help. i tried modifying the z-index, doing clear:both; and basically everything i could do.




Aucun commentaire:

Enregistrer un commentaire