Help with scrollspy

Help with scrollspy
0

#1

i cant figerout why my scrollspy not working :disappointed_relieved:


#2

You’ve got a number of problems here. First, you’re importing both Bootstrap 3.7 and 4-alpha in your CSS and JavaScript sections. Just pick one version as there will likely be conflicting code (I suggest sticking with 4-alpha). Second, when you define data-target in the <body> tag, Bootstrap is expecting a reference to an element with the nav class. #navnav is missing the nav class. Try fixing both of those problems and see if it helps. Here’s the documentation for 4-alpha:

Also, while it’s not likely messing up ScrollSpy, you should take all of the style definitions in your HTML and move them to your CSS. It’s really, really hard to read your code as is. Otherwise, good job so far. Your portfolio is coming together.


#3

thank you vere much but it still dosent work, and if you can also help me, i dont understand way my first section is not in full width


#4

Your html for navigation bar differs from how it’s supposed to be written. Bootstrap highlights navigation elements by adding ‘active’ class to ‘li’ tag:
`

` Your navbar structured differently so if course it's not working.

#5

thank you it works :grinning: