Linking to elements within the page -- Build a Technical Documentation Page

Linking to elements within the page -- Build a Technical Documentation Page
0

#1

Tell us what’s happening:

I’m receiving the following message on test #10 of my Technical Documentation CodePen;

"10. Additionally, the navbar should contain link () elements with the class of “nav-link”. There should be one for every element with the class “main-section”.

AssertionError: There should be one .nav-link for every element with the class of “main-section”, and every .nav-link should be within #navbar : expected 4 to equal 5"

I’ve checked my code multiple times now and am fairly confident that the navbar links should connect correctly to each of the elements with the class of “main-section”. Can anyone help me find where I’ve gone wrong?

Thank you in advance for any help you can offer!

Your code so far

This is the topic of the technical documentation. Topic 1 Topic 2 Topic 3 Topic 4 Topic 5 Topic 1

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.
  • A
  • B
  • C
  • D
  • E
Topic 2

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff. Topic 3

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff. Topic 4

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff. Topic 5

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.

Your browser information:

User Agent is: Mozilla/5.0 (X11; CrOS x86_64 10575.58.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/responsive-web-design/responsive-web-design-projects/build-a-technical-documentation-page


#2

Whoops, it looks like my code got rendered. Here’s the link to my code on CodePen: https://codepen.io/elidjunas/pen/OwWdBq


#3

ok so I looked into this by deleting each anchor link in your html, one by one, and checking the test case to see if it recognizes that the link was removed.
For eg. when I removed Topic 5 link, the error changed to say 3 out of 5
but when I removed Topic 4 instead, the error message did not change and still thought 4 out of 5 were correct
so i realised that topic 4’s link was the problem.
So I deleted that entirely and copied Topic 3’s link section instead (to make 2 topic 3 links)
and manually modified the second code to say 4 instead of 3, and now the test passed!

I think the line must have had some hidden control characters messing up the test…

so just apply the same fix and you will get past this.


#4

Wow, that’s some very creative troubleshooting you did there. I’ll have to remember that next time I’m debugging! Thank you so much for taking the time to figure it out for me hbar1st! I really appreciate it!