Skip to content

Commit 68c090c

Browse files
authored
Merge pull request #266 from DoyelMishra15/fix/home-link-smooth-scroll-v2
Fix: Broken Home link and added smooth scroll behavior for the issue 260
2 parents e064475 + bbe7c43 commit 68c090c

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
</head>
5151

5252
<body>
53+
<a id="top"></a> <!--added for issue 260 -->
5354
<!-- ================================ Header Section Start Here ================================ -->
5455
<header>
5556
<nav class="navbar navbar-expand-lg fixed-top">
@@ -72,7 +73,7 @@
7273
<a
7374
class="nav-link active"
7475
aria-current="page"
75-
href="#homeSection"
76+
href="#top"
7677
>Home</a
7778
>
7879
</li>

styles.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
padding: 0;
66
}
77

8+
/* Enable smooth scrolling when clicking anchor links like #top */
9+
html {
10+
scroll-behavior: smooth;
11+
}
12+
813
body {
914
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
1015
color: #1e293b;

0 commit comments

Comments
 (0)