0

I'm writing css for a practice website. I wanted the header section to be a block on the top of the screen that would stretch to the edges of the screen like this But instead my header looks like that.

My code in html:

<!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>
    <link rel="stylesheet" href="header.css">
</head>
<body>
    <header>title</header>
</body>
</html>

Code in css:

body {
    background-color: aliceblue;
}

header {
    background-color: aquamarine;
    display: block;
    text-align: center;
    padding: 10px;
}

What should I do?

cyanlava
  • 1
  • 2

0 Answers0