diff --git a/snippets/css/layouts/sticky-navbar.md b/snippets/css/layouts/sticky-navbar.md new file mode 100644 index 00000000..5967d147 --- /dev/null +++ b/snippets/css/layouts/sticky-navbar.md @@ -0,0 +1,16 @@ +--- +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%; + z-index: 999; +} +``` \ No newline at end of file