Skip to content

Commit 41621cb

Browse files
committed
Fixed navbar not sticky anymore
1 parent aaba55c commit 41621cb

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,7 @@ appsettings.Development.json
1313
*.publishproj
1414
*.suo
1515
sitemap.xml
16-
robots.txt
16+
robots.txt
17+
.vs/
18+
.idea/
19+
*.csproj.user

LinkDotNet.Blog.Web/Shared/NavMenu.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@inject AppConfiguration _configuration
22

3-
<header>
3+
<header class="nav-header">
44
<nav class="nav">
55
<div class="container">
66
<div class="logo">

LinkDotNet.Blog.Web/Shared/NavMenu.razor.css

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
2-
.nav {
3-
z-index: 10;
4-
background-color: rgba(0, 0, 0, 0.8);
1+
.nav-header {
52
position: sticky;
63
top: 0;
4+
z-index: 10;
5+
}
6+
7+
.nav {
8+
background-color: rgba(0, 0, 0, 0.8);
79
backdrop-filter: blur(6px);
810
}
911

0 commit comments

Comments
 (0)