Tech Doc Page: The nav bar is covering up the content, how to fix it? And there's an error I don't understand,

Hi, anyone can help me?

My exercise link here: https://codepen.io/nicole-ho-the-reactor/pen/wvrBgqE

  1. How to make menu not overlaying the contents?
  2. It keeps saying error:

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

Many thanks

Welcome to the forums @nicoleho0113.

When a test fails click the red button to see which test(s) are failing and text to help you correct the issue.
Be sure and read more than just the first line of the failing message. The ability to read and comprehend error messages is a skill you’ll need to acquire as a developer. Ask questions on what you don’t understand.

The failing message says

Additionally, the navbar should contain link (<a>) elements with the class of "nav-link". There should be one for every element with the class "main-section".
There should be one .nav-link for every element with the class of "main-section", and every .nav-link should be within #navbar : expected 14 to equal 13
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 14 to equal 13

Do you see/understand what the message is telling you?

How would you do your styling so that the navbar has width and the main-doc has the rest of that width?
Does that hint help?

position: fixed removed an html element out of the document flow, thus the element in the document “does not know” that there’s suppose something displayed on that area. If you still want to maintain position: fixed, ofc you have to adjust your margin-left for the main section.
https://developer.mozilla.org/en-US/docs/Web/CSS/position

The error said: “expected 14 to equal 13.” The spec does not want any bonus link from you.

There should be one .nav-link for every element with the class of "main-section", and every .nav-link should be within #navbar : expected 14 to equal 13

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