Tribute Page - Build a Tribute Page

Hello,
I need help with this one. I´m trying to center the h1 element vertically and horizontally the way I did, and put the p element below it, inside the header element.
Do you know what can I do?

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <meta name="description" content="freeCodeCamp Accessibility Quiz practice project" />
  <title>Dr. Norman Borlaug</title>
  <link rel="stylesheet" href="styles.css" />
</head>
<body>
  <header>
    <h1>Dr. Norman Borlaug</h1>
    <p>The man who saved a billion lives</p>
  </header>
  <main>
    <div class="container">
    </div>
  </main>
</body>
</html>

/* file: styles.css */
h1, p {
text-align: center;
font-family: Tahoma, sans-serif;
}

h1 {
  font-size: min(10vw, 50px);
}

p {
  font-size: 18px;
}

html{
  background-color: white;
  padding: 40px 10px 30px 10px;
  margin: 0;
  height: 2000px;
  width: 1600px;


}

header {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

body {
  background-color: #EAEAEA;
  border-radius: 8px;
  margin:0;
  
}

.container {
  background-color: white;
  height: 800px;
  width: 1550px;
  margin: auto 15px auto 25px;
  border: 0;
  
}

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36

Challenge: Tribute Page - Build a Tribute Page

Link to the challenge:

Well, it is just one solution. If I have understood the problem well.

1 Like

I´ll try it, only by setting a margin top to the h1 stay in the center