aniketsinha2002 / DataGeek

A static educational website related to Data Science built using HTML, CSS, JS, Bootstrap and Tailwind from scratch
https://aniketsinha2002.github.io/DataGeek/
89 stars 202 forks source link

Scroll Animation offset now causes accurate jump #737

Closed tamannaaaaa closed 11 months ago

tamannaaaaa commented 11 months ago

Description

The current scroll animation in the provided code snippet has an offset of -140 pixels from the top of the target section. While the intention behind adding the offset might be to account for a fixed header, it introduces an issue where the scrolling behavior becomes inaccurate under certain circumstances. Proposed Solution: Adjust the scroll animation offset in the JavaScript code to ensure accurate scrolling and alignment with the fixed header. Ideally, the offset should be equal to the height of the fixed header (if any) to maintain consistency across different devices and screen sizes.

Fixes #722

Replace issue_no with the issue number which is fixed in this PR