Tell us what’s happening:
Describe your issue in detail here.
Hi team. i have two issues with this exercise:
1- Each .main-section
should have an id
that matches the text of its first child, having any spaces in the child’s text replaced with underscores (_
) for the id’s.
2- Each .nav-link
should have an href
attribute that links to its corresponding .main-section
(e.g. If you click on a .nav-link
element that contains the text “Hello world”, the page navigates to a section
element with that id).
Your code so far
<!-- file: index.html -->
<!DOCTYPE html> <html lang="en">
<head>
<title>Technical Documentation Page</title>
<meta charset="utf-8">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<nav id="navbar">
<header>Technical Documentation</header>
<ul>
<li><a class="nav-link" href="#news">News</a></li>
<li><a class="nav-link" href="#category">Category</a></li>
<li><a class="nav-link" href="#prices">Prices</a></li>
<li><a class="nav-link" href="#products_name">Products Name</a></li>
<li><a class="nav-link" href="#forum">Forum</a></li>
</ul>
</nav>
<main id="main-doc">
<section class="main-section" id="#news">
<header>News</header>
<p></p>
<p></p>
<code></code>
<li></li>
</section>
<section class="main-section" id="#category">
<header>Category</header>
<p></p>
<p></p>
<code></code>
<li></li>
</section>
<section class="main-section" id="#prices">
<header>Prices</header>
<p></p>
<p></p>
<code></code>
<li></li>
</section>
<section class="main-section" id="#products_name">
<header>Products Name</header>
<p></p>
<p></p>
<code></code>
<li></li>
</section>
<section class="main-section" id="#forum">
<header>Forum</header>
<p></p>
<p></p>
<code></code>
<li></li>
</section>
</main>
</body>
</html>
/* file: styles.css */
navbar
{
text-align: left;
}
@media (max-width: 600px) {
body {
background-color: lightblue;
}
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36
Challenge: Technical Documentation Page - Build a Technical Documentation Page
Link to the challenge: