Tell us what’s happening:
I used an HTML & CSS validator and both came out correct, but I am still failing tests related to the body element.
-
Failed:10. Your
bodyelement should have a top and bottom padding of50px. -
Failed:11. Your
bodyelement should have a top and bottom margin of0. -
Failed:12. Your
bodyelement should have a left and right margin ofauto. -
Failed:13. Your
bodyelement should set its width usingvw. -
Failed:14. Your
bodyshould usecalcto set itsmin-heightto100vh - 100px. -
16. The width of your
hrelements should be set using a percent value.
Your code so far
<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Build an Event Flyer Page</title>
<link rel= "stylesheet" href="styles.css">
</head>
<body>
<header>
<img src="https://cdn.freecodecamp.org/curriculum/labs/event.jpg" alt="colourful tags" />
<h1>An Event</h1>
</header>
<main>
<section>
<h2>Description</h2>
</section>
<hr>
<section>
<h2>Description 2</h2>
</section>
</main>
</body>
</html>
/* file: styles.css */
.body {
padding-top: 50px;
padding-bottom: 50px;
margin-top: 0px;
margin-bottom: 0px;
margin-left: auto;
margin-right: auto;
width: 100vw;
min-height: calc(100vh - 100px)
}
.hr, section {
width: 20%;
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36
Challenge Information:
Build an Event Flyer Page - Build an Event Flyer Page