This is the one rule that I have not yet satisfied for this test:
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">
<main id= "main-doc">
<section id="media_mobility" class="main-section">
<header>Media Mobility</header>
<p></p>
<p></p>
<ul>
<li></li>
<li></li>
</ul>
<code></code>
</section>
<section id="action_vlogger" class="main-section">
<header>Action Vlogger</header>
<p></p>
<p></p>
<ul>
<li></li>
<li></li>
</ul>
<code></code>
</section>
</section>
<section id="producer" class="main-section">
<header>Producer</header>
<p></p>
<p></p>
<ul>
<li></li>
<li></li>
</ul>
<code></code>
</section>
<section id="crew_support" class="main-section">
<header>Crew Support</header>
<p></p>
<p></p>
<ul>
<li></li>
<li></li>
</ul>
<code></code>
</section>
<section id="cargo_hauler" class="main-section">
<header>Cargo Hauler</header>
<p></p>
<p></p>
<ul>
<li></li>
<li></li>
</ul>
<code></code>
</section>
<nav id="navbar">Action Vlogger
<header>NAVIGATE SITE</header>
<a href="main-doc" class="nav-link">Media Mobility</a>
<a href="main-doc" class="nav-link">Action Vlogger</a>
<a href="main-doc" class="nav-link">Producer</a>
<a href="main-doc" class="nav-link">Crew Support</a>
<a href="main-doc" class="nav-link">Cargo Hauler</a>
</nav>
</main>
<link rel="stylesheet" href="styles.css">
</html>
/* file: styles.css */
#navbar {
position: fixed;
left: 0;
margin-left: 0;
padding-left: 0;
}
@media { max-width: 1100px;
.main-section {
min-width: 500px;
max-width: 1100px;
}
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36 Edg/121.0.0.0
Challenge Information:
Technical Documentation Page - Build a Technical Documentation Page