elements are starting under navigation. Html | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

elements are starting under navigation. Html

Hello i have one problem.I have one page scroll and when I click at navigation for example to home i get redirected to home but it starts under fixed navigation i need to move start of everything bellow fixed navigation (at least i think that the problem) and you can check this web on my profile in Codes under name My 2nd Web.

1st Feb 2018, 5:35 AM
Dalibor Trampota
Dalibor Trampota - avatar
5 Answers
+ 2
hello. I checked your code and edited it. check it out here: https://code.sololearn.com/Wr2VgekhU2v9/?ref=app from my readings, i figured you had a margin issue between each block of section, starting from the top. i inserted an empty div before each section and gave it a margin of 150px. then for each nav link, i directed them to each empty div which comes before each section. it's one way to fix it. bear in mind that there are multiple ways to fix this, this is just one.
1st Feb 2018, 12:13 PM
JonesIO
JonesIO - avatar
+ 4
I prefer to use JavaScript or jQuery here for OnePage Website and Scrolling. I suggest you to plug jQuery plug-in jquery.min.js and paste the code in JS Section or you see the reference from the below code examples. I solved your issue as well in second attached code. https://code.sololearn.com/WJHwr8mh31zx/?ref=app https://code.sololearn.com/WKAm59BvGAGw/?ref=app
1st Feb 2018, 11:18 AM
Rex Terminous
Rex Terminous - avatar
+ 1
It's seems better when you tapped the links but it's weird when you scroll normally. you can see a large blank spaces between different section which is 150px. Reply for @Jones Ossai
1st Feb 2018, 2:44 PM
Rex Terminous
Rex Terminous - avatar
+ 1
@Rizwan thanks for that observation. i Wonder why i didn't think of that.
1st Feb 2018, 9:40 PM
JonesIO
JonesIO - avatar
0
Thanks. I for this idea too to put empty "boxes" on front of the main but i didnt knew how to do this
1st Feb 2018, 1:07 PM
Dalibor Trampota
Dalibor Trampota - avatar