AbhiPatel10 / AISKCON-CONSTRUCTION

https://abhipatel10.github.io/AISKCON-CONSTRUCTION/
56 stars 185 forks source link

[Fixes #352] Fixed Navbar Scroll Problem #373

Closed ritik48 closed 1 year ago

ritik48 commented 1 year ago

Summary

Whenever the pag was scrolled , there was a movement in navbar as well. I solved it by changing the position 'sticky' of navabr to 'fixed' and then provided the required top, left, right value.

Fixes #352

Type of change

Please select the relevant option.

Checklist

Please tick the relevant options.

Screenshots

Now there is no movement in navbar when the page is scrolled. aiskcon

Additional context

Add any other context about the pull request here.

kartikayasija commented 1 year ago

Don't change the position to fixed, make it sticky and then fix the bug. Also why you change the color of navbar?

ritik48 commented 1 year ago

@kartikayasija I changed the background back to white. Other than position fixed, I could not find any other way to solve it. I searched about this behaviour and found that sticky has this buggy jump behaviour on scroll.