Hello, im having trouble with User Story #4, #10, #12 and #13. I’ve already checked for different solutions for each one and i can’t sort out what’s wrong with my code (im fairly new, my apologies if it’s somewhat messy.)
Here’s the link to my project: https://codepen.io/_World/pen/LYZMpWJ?editors=1100
and here are the user stories im having trouble with:
User Story #4: Each section
element with the class of main-section
should also have an id that corresponds with the text of each header
contained within it. Any spaces should be replaced with underscores (e.g. The section
that contains the header “JavaScript and Java” should have a corresponding id="JavaScript_and_Java"
).
User Story #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
.
User Story #12: Each element with the class of nav-link
should contain text that corresponds to the header
text within each section
(e.g. if you have a “Hello world” section/header, your navbar should have an element which contains the text “Hello world”).
User Story #13: When I click on a navbar element, the page should navigate to the corresponding section of the main-doc
element (e.g. If I click on a nav-link
element that contains the text “Hello world”, the page navigates to a section
element that has that id and contains the corresponding header
.
Thanks in advance!