Skip to content

Commit fe7f629

Browse files
committed
🐛 (CSS): Fix nav link jump
Keep section of nav bar when jump by nav link
1 parent 735d378 commit fe7f629

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

styles/globals.css

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
@import url('https://preline.co/assets/css/main.min.css');
32

43
@import "tailwindcss";
@@ -20,3 +19,9 @@ body {
2019
background: var(--background);
2120
font-family: Arial, Helvetica, sans-serif;
2221
}
22+
23+
h2 {
24+
position: relative;
25+
padding-top: 5rem; /* Adjust this value to match the height of your navbar */
26+
margin-top: -5rem; /* Same value as padding-top */
27+
}

0 commit comments

Comments
 (0)