All of your .nav-link elements should be in the #navbar

Hi. Im having trouble with the following: All of your .nav-link elements should be in the #navbar.

Can someone help me?
heres the code.
for css i only used a media query.

@media screen and (max-width:750px){
  width:50%
}
<!DOCTYPE: html>
<html lang="en">
  <head>
    <title>Technical Documentation page</title>
     <meta charset="UTF-8">
     <link rel="stylesheet" href="styles.css" />
  </head>
  <body>
    <main id="main-doc">
      <nav id="navbar">
       <header>
<ul>
       <li><a href="#one">one</a></li>
       <li><a href="#two">two</a></li>
       <li><a href="#three">three</a></li>
       <li><a href="#four">four</a></li>
       <li><a href="#five">five</a></li>
</ul>     
         
       </header></nav>
<section class="main-section" id="one">
<header>one</header>
<p><a class="nav-link" href="#one">one</a></p>
<ul>   <li></li>
       <li></li>
       <li></li>
       <li></li>
       <li></li> 
</ul>   
<p></p>
<code></code>
</section>
<section class="main-section" id="two">
<header>two</header>
 <p><a class="nav-link" href="#two">two</a></p>
 <p></p><code></code>
 </section>
<section class="main-section" id="three"> 
 <header>three</header>
 <p><a class="nav-link" href="#three">three</a></p>
 <p></p><code></code>
 </section>
<section class="main-section" id="four">
   <header>four</header>
 <p><a class="nav-link" href="#four">four</a></p>
 <p></p><code></code>
 </section>
<section class="main-section" id="five">
  <header>five</header>
 <p><a class="nav-link" href="#five">five</a></p>
 <p></p><code></code>
 </section>  
    </main>
  </body>
</html>

Im running the latest version of google.

Hello.
Please add link to the task. Thanks.

The nav-link class is supposed to be on the links inside the main top navigation.

I also do not see the point of having links inside sections that link to that section, if you can click that link you are already at the section.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.