From 5305b4b36fa251bd029fdbd884441989f6bd9f0f Mon Sep 17 00:00:00 2001 From: Haider Mukhtar Date: Mon, 6 Jan 2025 15:15:17 +0500 Subject: [PATCH] sticky navbar - css --- snippets/css/layouts/sticky-navbar.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 snippets/css/layouts/sticky-navbar.md diff --git a/snippets/css/layouts/sticky-navbar.md b/snippets/css/layouts/sticky-navbar.md new file mode 100644 index 00000000..572932c2 --- /dev/null +++ b/snippets/css/layouts/sticky-navbar.md @@ -0,0 +1,15 @@ +--- +title: Sticky Navbar +description: Ensure the navbar always shows and remains at the top of the page on scroll. +author: Haider Mukhtar +tags: layout,navbar,sticky +--- + +```css +.navbar{ + position: fixed; + top: 0; + left: 0; + width: 100%; +} +```